home *** CD-ROM | disk | FTP | other *** search
/ AEMail 2.40 / AEMail v2.40.iso / install_aemail < prev    next >
Text File  |  2001-03-22  |  101KB  |  2,420 lines

  1. ;**
  2. ;** Install_AEMail - AEMail installation script for Installer
  3. ;**
  4. ;** Copyright (c) 1996-2000 John F. Zacharias
  5. ;**                    All rights reserved.
  6. ;**
  7. ;** This script has been tested with Installer 43.3 which is included with
  8. ;** this archive:
  9. ;**
  10. ;**     Installer and Installer project icon
  11. ;**     (c) Copyright 1995-96 Escom AG.  All Rights Reserved.
  12. ;**     Reproduced and distributed under license from Escom AG.
  13. ;**
  14. ;**     INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
  15. ;**     NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
  16. ;**     OR RESPONSIBILITY IS ASSUMED.
  17. ;**
  18. ;** Use following Icon tooltypes / Command line options:
  19. ;**
  20. ;** APPNAME=AEMail Version x.xx
  21. ;** MINUSER=AVERAGE
  22. ;**
  23. ;**
  24. ;** Installer script modified on 03/31/00 for AEMail Version 2.40
  25. ;** Modified to handle installation from CDROM
  26.  
  27. (set
  28.  ;;
  29.  ;; The source directory name
  30.  ;;
  31.  source-dir (if (= 1 (exists @icon))
  32.             (pathonly (expandpath @icon))
  33.             (expandpath @icon)))
  34.  
  35. (set version_3_0 39)
  36. (set version_3_5 44)
  37.  
  38. (set aem-vernum (getversion (tackon source-dir "AEMail")))
  39. (set
  40.     aem-vernew (/ aem-vernum 65536)
  41.     aem-revnew (- aem-vernum (* aem-vernew 65536))
  42.     aem-verstr ("%ld.%02ld" aem-vernew aem-revnew))
  43.  
  44. (debug "The value of 'source-dir' is " source-dir)
  45. (debug "The file part of 'source-dir' is " (fileonly source-dir)) 
  46. (debug "The path part of 'source-dir' is " (pathonly source-dir)) 
  47. (debug "The value of 'aem-vernew' is " aem-vernew)
  48. (debug "The value of 'aem-revnew' is " aem-revnew)
  49. (debug "The value of 'aem-verstr' is " aem-verstr)
  50.  
  51. (set
  52.     aem-dpref ""
  53.     aem-dsk1 ""
  54.     aem-dsk2 "")
  55.  
  56. (if (= "-Disk" (substr source-dir 12 5))
  57.     (set
  58.         aem-dpref (substr source-dir 0 12)
  59.         aem-dsk1 (cat aem-dpref "-Disk_1")
  60.         aem-dsk2 (cat aem-dpref "-Disk_2"))
  61.     ((makeassign aem-dsk1 source-dir (safe))
  62.      (makeassign aem-dsk2 source-dir (safe))))
  63.  
  64.  
  65. (debug "The value of 'aem-dpref' is " aem-dpref)
  66. (debug "The value of 'aem-dsk1' is " aem-dsk1)
  67. (debug "The value of 'aem-dsk2' is " aem-dsk2)
  68.  
  69.  
  70. (set aem-rexx-dir "")
  71.  
  72.  
  73. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES 
  74. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  75. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  76. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  77.  
  78. ; $VER: ClassAct_Install 1.16 (9.3.97) by Osma Ahvenlampi
  79.  
  80. (set cpu (database "cpu"))
  81. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  82. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  83.  
  84. ; percentage of the size of included ClassAct classes versus the whole
  85. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  86.  
  87. (set classact-complete 90)
  88.  
  89. ; ClassAct installer scripts 
  90.  
  91. ;***********************************
  92. ;English Strings 
  93. ;***********************************
  94. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  95. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  96.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  97.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  98.         )
  99.     )
  100.  
  101. )
  102. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  103. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  104. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  105. (set #creating-dir "Creating directory ")
  106. (set #usbackup-prompt "User-Startup will now be backed up.")
  107. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  108. (set #adding-1 "Adding ")
  109. (set #adding-2 " to LIBS: assign\n")
  110. (set #adding-help "This is necessary so that the custom classes can be found.")
  111. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  112. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  113. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  114. ;(set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  115. (set #caprefs-message "ClassAct has several user-configurable aspects that affect the look of ClassAct interfaces.\n\nThese settings can be changed using the ClassAct preferences tool that will be installed in yout Prefs drawer.\n\nA small tool, CAPrefs, will be added to your user-startup to load the settings on reboot.")
  116. (set #caprefs-startup-1 "Adding the command\n\n")
  117. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  118. (set #decompressing-classact "Compressed ClassAct distribution detected\n\nDecompressing to T:")
  119. (set #deleting-cltmp "Deleting temporary files")
  120.  
  121. ;***********************************
  122. ;Spanish Strings 
  123. ;***********************************
  124. (if (= @language "español")  
  125. (
  126.  (set #classdest-prompt "Por favor, seleccione el directorio donde desea instalar las clases de ClassAct.\n(Vea la ayuda para más detalles)")
  127.  (set #classdest-help (cat "ClassAct es un kit de interface gráfica consistente es clases compartidas BOOPSI.\n\nAlgunos programas requieren que algunas o todas de las clases de ClassAct estén instaladas en su sistema. "
  128.  
  129.     (if v39 (cat "El OS 3.0 tiene un directorio estándar para las clases BOOPSI: el directorio SYS:Classes. Se recomienda que instale ClassAct ahí.")
  130.             (cat "El OS 2.0 no tiene un sitio estándar para las clases BOOPSI residentes en disco. En el OS 3.0 esas clases son almacenadas en el directorio SYS:Classes. Se recomienda que cree este directorio e instale ClassAct ahí.\nEste directorio debe ser añadido a la asignación de LIBS:. Esto puede ser hecho colocando el comando\nAssign >NIL: LIBS: SYS:Classes ADD\nal User-Startup. Este instalador lo hará por usted.")
  131.         )
  132.     )
  133.  )
  134.  (set #classes-020 "¿Quiere usar la versión optimizada para OS 3.0 y 020 de ClassAct?")
  135.  (set #help-020 "Algunas librerías de ClassAct tienen versiones optimizadas para el uso en máquinas con OS 3.0 y 020 o superior. Si su Amiga es una de tales máquinas debería instalar estas. Las versiones 68000/2.0 también funcionarán, pero son ligeramente más lentas")
  136.  (set #noclasses-message "El subdirectorio que seleccionó para sus clases ClassAct no forma parte de la asignación de LIBS:.\n\nEs necesario añadir esta asignación para que las clases puedan ser localizadas adecuadamente.")
  137.  (set #creating-dir "Creando directorio ")
  138.  (set #usbackup-prompt "Ahora se hará una copia de seguridad del User-Startup.")
  139.  (set #usbackup-help "Este instalador hará ahora una modificación en el User-Startup. Antes de hacer esto se hará una copia de seguridad del User-Startup en S:User-Startup.old")
  140.  (set #adding-1 "Añadiendo ")
  141.  (set #adding-2 "a la asignación de LIBS:\n")
  142.  (set #adding-help "Esto es necesario para que las clases puedan ser encontradas.")
  143.  (set #junod-button "Parece que tiene el último button.gadget de Comodore ('V42') instalado en su sistema.\n\nEl button.gadget de ClassAct es superior a este gadget y le recomendamos que lo remplace. El button.gadget de ClassAct es compatible con el de Commodore. ¿Desea hacer una copia de seguridad del gadget de Commodore y remplazarlo por la versión de ClassAct?")
  144.  (set #junod-backed "Se ha hecho una copia de seguridad del button.gadget 'V42' de Commodore con el nombre button.gadget.v42.\n\nEl button.gadget de ClassAct será instalado en su lugar.")
  145.  (set #junod-kept "El button.gadget 'V42' de Commodore no fué remplazado con la versión superior de ClassAct.\n\nLos programas que dependan de la disponibilidad de las características de la versión de ClassAct funcionarán mal probablemente")
  146.  ;(set #caprefs-message "CAPrefs es una pequeña utilidad que inicializa algunas preferencias del usuario para las aplicaciones ClassAct. Estas incluyen el estilo de resaltado (Fino/GadTools/Xen), relleno de ventanas, y detalles de las etiquetas de grupo.\n\nPor favor, use las preferencias de interface de ClassAct en su cajón de sistema 'Prefs' .\n\n")
  147.  (set #caprefs-message "ClasAct tiene varios aspectos configurables por el usuario que afectan a la apariencia de las interfaces ClassAct.\n\nEstos ajustes pueden ser modificados usando la herramienta de preferencias de ClassAct que será instalada en su cajón 'Prefs'.\n\nUna pequeña herramienta, CAPrefs, será añadida a su user-startup para cargar los ajustes al arrancar.")
  148.  (set #caprefs-startup-1 "Añadiendo el comando\n\n")
  149.  (set #caprefs-startup-2 "\n\nA su s:User-Startup.")
  150.  (set #decompressing-classact "Distribución de Classact comprimida detectada\n\nDescomprimiendo a T:")
  151.  (set #deleteing-cltmp "Borrando ficheros temporales")
  152. )
  153. )
  154.  
  155. ;***********************************
  156. ; Italian Strings 
  157. ;***********************************
  158. (if (= @language "italiano")
  159. (
  160.  (set #classdest-prompt "Per favore scegli la directory in cui vuoi installare le classi ClassAct.\n(Vedi Aiuto per i dettagli)")
  161.  (set #classdest-help (cat "ClassAct è un toolkit GUI che consiste di classi BOOPSI condivise.\n\nCerti programmi richiedono che alcune o tutte le classi ClassAct siano installate sul tuo sistema. "
  162.     (if v39 (cat "Il SO 3.0 ha una directory standard per le classi BOOPSI, la directory SYS:Classes. Si raccomanda d'installare ClassAct proprio lì.")
  163.             (cat "Il SO 2.0 non ha un posto standard per le classi BOOPSI residenti su disco. Nell'OS 3.0 queste classi sono immagazzinate nella directory SYS:Classes. Si raccomanda di creare questa directory e d'installarvi ClassAct.\nQuesta directory dev'essere aggiunta nell'assign LIBS:. Ciò può essere fatto mettendo il comando\nAssign >NIL: LIBS: SYS:Classes ADD\nnella User-Startup. Questo script d'installazione lo farà per te.")
  164.         )
  165.     )
  166.  )
  167.  (set #classes-020 "Vuoi usare la versione ottimizzata per SO 3.0 e CPU 020 di ClassAct?")
  168.  (set #help-020 "Alcune librerie ClassAct hanno versioni ottimizate per l'uso su macchine equipaggiate con una CPU 020 o superiore e il SO 3.0. Se il tuo Amiga é così equipaggiato, dovresti installarle. Le versioni 68000/2.0 funzioneranno comunque, ma sono più lente.")
  169.  (set #noclasses-message "La directory che hai scelto per le tue classi ClassAct non é parte dell'assign LIBS:.\n\nE' necessario aggiungere questo assegnamento affinché le classi siano trovate correttamente.")
  170.  (set #creating-dir "Creo la directory ")
  171.  (set #usbackup-prompt "La User-Startup sarà ora copiata per sicurezza.")
  172.  (set #usbackup-help "Questa installazione ora modificherà la User-Startup. Prima di fare ciò, la vecchia User-Startup sarà copiata per sicurezza in S:User-Startup.old")
  173.  (set #adding-1 "Aggiungo ")
  174.  (set #adding-2 " all'assign LIBS:\n")
  175.  (set #adding-help "Questo è necessario per far trovare al sistema le classi custom.")
  176.  (set #junod-button "Sembra che hai installato un recente button.gadget 'V42' della Commodore sul tuo sistema.\n\nIl button.gadget di ClassAct é molto più potente di questo gadget, e raccomandiamo di sostituirlo. Il button.gadget di ClassAct é compatibile con il gadget Commodore. Vuoi copiare per sicurezza il gadget Commodore e sostituirlo con la versione ClassAct?")
  177.  (set #junod-backed "Il  button.gadget della Commodore 'V42' é stato copiato per sicurezza col nome button.gadget.v42.\n\nIl button.gadget di ClassAct sarà installato al suo posto.")
  178.  (set #junod-kept "Il button.gadget 'V42' della Commodore non é stato sostituito dalla versione ClassAct più potente.\n\nI programmi che dipendono dalla disponibilità delle caratteristiche di ClassAct probabilmente funzioneranno male.") 
  179.  ;(set #caprefs-message "CAPrefs è una piccola utility che setta alcune preferenze dell'utente per le applicazioni ClassAct. Tra queste, lo stile dei bevel (Thin/Gadtools/Xen), i backfill delle finestre, ed il dettaglio della group label.\n\nPer favore usa l'editor di preferenze ClassAct GUI per modificare i settaggi standard forniti. ClassAct prefs sarà installato nel cassetto Prefs del tuo sistema.\n\n")
  180.  (set #caprefs-message "ClassAct ha diversi aspetti configurabili dall'utente che modificano l'aspetto delle interfacce ClassAct.\n\nQuesti settaggi possono essere cambiati usando il programma di preferenze ClassAct sarà installato nel tuo cassetto Prefs.\n\nUna piccola utility, CAPrefs, sarà aggiunta alla tua user-startup per caricare i settaggi al reboot.")
  181.  (set #caprefs-startup-1 "Aggiungo il comando\n\n")
  182.  (set #caprefs-startup-2 "\n\nalla tua S:User-Startup.")
  183.  (set #decompressing-classact "Trovata una distribuzione ClassAct compressa\n\nLa decomprimo in T:")
  184.  (set #deleting-cltmp "Cancello i file temporanei")
  185. )
  186. )
  187.  
  188. ;***********************************
  189. ; Swedish Strings 
  190. ;***********************************
  191. (if (= @language "svenska")
  192. (
  193. (set #classdest-prompt "Var god välj den låda där du vill installera ClassAct-klasserna.\n(Se hjälpen för detaljer.)")
  194. (set #classdest-help (cat "ClassAct är en verktygslåda för skapandet av användargränssnitt (GUI), som består av ett antal så kallade delade BOOPSI-klasser.\n\nEn del program kräver att en del, eller alla, ClassAct-klasser är installerade i din Amiga. "
  195.  
  196.     (if v39 (cat "OS 3.0 har en standardlåda för BOOPSI-klasser, Sys:Classes. Det rekommenderas att du installerar ClassAct där.")
  197.             (cat "OS 2.0 har inte någon standardlåda för diskbaserade BOOPSI-klasser. I OS 3.0 lagras sådana klasser i lådan Sys:Classes. Det rekommenderas att du skapar denna låda, och installerar ClassAct där.\nDenna låda måste vara en del av Libs:-tilldelningen. Detta kan göras genom att placera kommandot\nAssign >NIL: Libs: Sys:Classes ADD\ntill filen S:User-Startup. Den här installeraren kommer att göra det åt dig.")
  198.         )
  199.     )
  200.  
  201. )
  202.  
  203. (set #classes-020 "Vill du använda OS 3.0-versionen av ClassAct, som är optimerad för en 68020?")
  204. (set #help-020 "Några ClassAct-klasser finns i versioner som är optmierade för en 68020 och OS 3.0 eller bättre. Om din Amiga har sådan utrustning (eller bättre), så bör du installera dem. Versionerna för 68000/2.0 fungerar också, men de är något långsammare.")
  205. (set #noclasses-message "Den låda du har valt för ClassAct-klasserna är inte en del av Libs:-tilldelningen.\n\nDet är nödvändigt att lägga till denna tilldelning, så att klasserna kan hittas utan problem.")
  206. (set #creating-dir "Skapar lådan ")
  207. (set #usbackup-prompt "S:User-Startup kommer nu att backas upp.")
  208. (set #usbackup-help "Den här installeraren kommer strax att modifiera filen S:User-Startup. Innan detta görs, kommer den gamla S:User-Startup att backas upp till S:User-Startup.old")
  209. (set #adding-1 "Lägger till ")
  210. (set #adding-2 " till Libs:-tilldelningen\n")
  211. (set #adding-help "Detta måste göras för att klasserna ska kunna hittas.")
  212. (set #junod-button "Det ser ut som om du har Commodores 'V42' button.gadget installed i din Amiga.\n\nClassActs button.gadget kan mycket mer än denna knapp, och vi rekommenderar att du ersätter den. ClassAct-versionen av button.gadget är bakåtkompatibel med Commodore-knappen. Vill du backa upp Commodore-knappen, och ersätta den med ClassAct-versionen?")
  213. (set #junod-backed "Commodores 'V42' button.gadget har backats upp som button.gadget.v42.\n\nClassActs button.gadget kommer att installeras istället.")
  214. (set #junod-kept "Commodores 'V42' button.gadget har inte ersatts av den mer kapabla ClassAct-versionen.\n\nProgram som förlitar sig på tillgängligheten av ClassAct-specifika funktioner kommer troligen inte att fungera som de ska.")
  215.  
  216. ;(set #caprefs-message "CAPrefs är ett litet program som sätter användarinställningarna för ClassAct-program. Dessa inställningar inkluderar ramstil (smal/gadtools/xen), fönsterbakgrunder samt detaljer rörande gruppetiketter.\n\nVar god använd ClassActs grafiska inställningsredigerare för att ändra de förvalda inställningarna. ClassActs inställningsredigerare kommer att installeras i din Amigas Prefs-låda.\n\n")
  217.  
  218. (set #caprefs-message "ClassAct har flera användardefinierbara aspekter som påverkar hur ClassAct-gränssnitt ser ut.\n\nDessa inställningar kan ändras genom att använda ClassActs inställningsredigerare, som kommer att installeras i din Amigas Prefs-låda.\n\nEtt litet program, CAPrefs, kommer att läggas till din S:User-Startup, för att läsa in inställningarna vid systemuppstart.")
  219. (set #caprefs-startup-1 "Lägger till kommandot\n\n")
  220. (set #caprefs-startup-2 "\n\ntill din s:User-Startup.")
  221. (set #decompressing-classact "Komprimerad ClassAct-distribution upptäckt\n\nPackar upp till T:")
  222. (set #deleting-cltmp "Raderar temporära filer")
  223. )
  224. )
  225.  
  226.  
  227. (procedure install-classact ; call this procedure to copy the classes included in the Classes directory
  228. ; in your distribution dir.
  229. ;
  230. ;   (if (exists "ClassAct.lha") ; ClassAct is compressed - need to decompress first
  231. ;       (                       ; Distribution includes LHEX
  232. ;           (working (cat #decompressing-classact))
  233. ;
  234. ; ClassAct.lha contains paths/files "Classes/*", "C/CheckAssign", "Prefs/CAPrefs" and "Prefs/ClassAct"
  235. ;
  236. ;           (run "lhex -aqfw=T:ClassAct/ x ClassAct.lha")
  237. ;           (set #classact-source "T:ClassAct")
  238. ;       )
  239. ;       (set #classact-source (pathonly @icon))
  240. ;   )
  241. ;   (if (exists "ClassAct.lzx") ; ClassAct is compressed - need to decompress first
  242. ;       (                       ; Distribution includes UNLZX
  243. ;           (working (cat #decompressing-classact));
  244. ;
  245. ; ClassAct.lzx contains paths/files "Classes/*", "C/CheckAssign",  "Prefs/CAPrefs" and "Prefs/ClassAct"
  246. ;
  247. ;           (run "unlzx -amq x ClassAct.lzx T:ClassAct/")
  248. ;           (set #classact-source "T:ClassAct")
  249. ;       )
  250. ;       (set #classact-source (pathonly @icon))
  251. ;   )
  252.  
  253.     (if (exists (tackon #classact-source "Classes")) ; The archive contains a ClassAct library update.
  254.     (
  255.         (set comp-dest  (/ (* classact-complete 2) 10))
  256.         (set comp-libs  (/ (* classact-complete 3) 10))
  257.         (set comp-dirs  (/ (* classact-complete 4) 10))
  258.         (set comp-junod (/ (* classact-complete 5) 10))
  259.         (set comp-020   (/ (* classact-complete 6) 10))
  260.         (set comp-gad   (/ (* classact-complete 7) 10))
  261.         (set comp-im    (/ (* classact-complete 8) 10))
  262.         (set comp-prefs (/ (* classact-complete 9) 10))
  263.     
  264.         ; has the user installed ClassAct in CLASSACT: ?
  265.         (set #classact-dest (getassign "CLASSACT" "A"))
  266.         (set @default-dest #classact-dest)
  267.         (if (= #classact-dest "") (set #classact-dest "SYS:Classes"))
  268.         
  269.         ; is ClassAct already in SYS:Classes ?
  270.         (if (or (not (exists (tackon #classact-dest "Gadgets/layout.gadget") (noreq)))
  271.                 (= @user-level 2))
  272.             ; no, ask where it should be placed
  273.             (set #classact-dest
  274.                 (askdir
  275.                     (prompt #classdest-prompt)
  276.                     (help #classdest-help)
  277.                     (default #classact-dest)
  278.                     (newpath)
  279.                 )
  280.             )
  281.         )
  282.         
  283.         (complete comp-dest)
  284.         
  285.         (if (<> (run (cat "\"" (tackon #classact-source "C/CheckAssign\"") " LIBS: " #classact-dest)) 0)
  286.             (
  287.                 (message #noclasses-message)
  288.                 (if (not (exists #classact-dest))
  289.                     (makedir #classact-dest (prompt (cat #creating-dir #classact-dest)))
  290.                 )
  291.                 (set #addassign (cat "Assign >NIL: LIBS: " #classact-dest " ADD\n"))
  292.                 (startup "CLASSACT"
  293.                     (command #addassign)
  294.                     (prompt (cat #adding-1 #classact-dest #adding-2))
  295.                     (help #adding-help)
  296.                 )
  297.                 (run (#addassign))
  298.             )
  299.         )
  300.         
  301.         (complete comp-libs)
  302.         
  303.         (set #classact-gadgets (tackon #classact-dest "Gadgets"))
  304.         (set #classact-images (tackon #classact-dest "Images"))
  305.         
  306.         (if (not (exists #classact-gadgets (noreq)))
  307.             (makedir #classact-images
  308.                 (prompt (cat #creating-dir #classact-gadgets))
  309.             )
  310.         )
  311.         
  312.         (if (not (exists #classact-images (noreq)))
  313.             (makedir #classact-images
  314.                 (prompt (cat #creating-dir #classact-images))
  315.             )
  316.         )
  317.         
  318.         (complete comp-dirs)
  319.         
  320.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  321.             (if (and (= 2752514 (getversion "SYS:Classes/Gadgets/button.gadget"))
  322.                     (= 4868 (getsize "SYS:Classes/Gadgets/button.gadget")))
  323.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  324.                     (
  325.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  326.                         (message #junod-backed)
  327.                     )
  328.                     (message #junod-kept)
  329.                 )
  330.             )
  331.         )
  332.         
  333.         (complete comp-junod)
  334.         
  335.         (if (and (and cpu020 v39) (exists (tackon #classact-source "Classes/Gadgets/layout.gadget.020")))
  336.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default 1)))
  337.             (set classes-020 0)
  338.         )
  339.  
  340.         (complete comp-020)
  341.         
  342.         (set #source-path (tackon #classact-source "Classes/Gadgets"))
  343.         (foreach #source-path "#?.gadget"
  344.             (
  345.                 (set thislib (tackon #source-path @each-name))
  346.                 (if (and classes-020 (exists (cat thislib ".020")))
  347.                     (set thislib (cat thislib ".020"))
  348.                 )
  349.                 (copylib (source thislib)
  350.                     (dest #classact-gadgets)
  351.                     (newname @each-name)
  352.                     (prompt (cat #installing @each-name))
  353.                     (help #classdest-help)
  354.                     (optional "force" "askuser")
  355.                 )
  356.             )
  357.         )
  358.         
  359.         (complete comp-gad)
  360.         
  361.         (set #source-path (tackon #classact-source "Classes/Images"))
  362.         (foreach #source-path "#?.image"
  363.             (
  364.                 (set thislib (tackon #source-path @each-name))
  365.                 (if (and classes-020 (exists (cat thislib ".020")))
  366.                     (set thislib (cat thislib ".020"))
  367.                 )
  368.                 (copylib (source thislib)
  369.                     (dest #classact-images)
  370.                     (newname @each-name)
  371.                     (prompt (cat #installing @each-name))
  372.                     (help #classdest-help)
  373.                     (optional "force" "askuser")
  374.                 )
  375.             )
  376.         )
  377.         
  378.         (complete comp-im)
  379.  
  380.         (set #source-path (tackon #classact-source "Classes"))
  381.         (foreach #source-path "#?.class"
  382.             (
  383.                 (set thislib (tackon #source-path @each-name))
  384.                 (if (and classes-020 (exists (cat thislib ".020")))
  385.                     (set thislib (cat thislib ".020"))
  386.                 )
  387.                 (copylib (source thislib)
  388.                     (dest #classact-dest)
  389.                     (newname @each-name)
  390.                     (prompt (cat #installing @each-name))
  391.                     (help #classdest-help)
  392.                     (optional "force" "askuser")
  393.                 )
  394.             )
  395.         )
  396.     )
  397.     )
  398.     (if (exists (tackon #classact-source "Prefs/ClassAct")) ; The archive contains ClassAct prefs tools
  399.     (
  400.         (message #caprefs-message)
  401.         
  402.         (copylib (source (tackon #classact-source "Prefs/CAPrefs")) 
  403.             (dest "C:") 
  404.             (prompt (cat #installing "CAPrefs"))
  405.         )
  406.         (copylib (source (tackon #classact-source "Prefs/ClassAct"))
  407.             (dest "SYS:Prefs")
  408.             (prompt (cat #installing "ClassAct Prefs"))
  409.             (infos)
  410.         )
  411.         
  412.         (complete comp-prefs)
  413.         
  414.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  415.             (
  416.                 (makedir "ENVARC:ClassAct"
  417.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  418.                 )
  419.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  420.                     (append "")
  421.                 )
  422.             )
  423.         )
  424.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  425.  
  426.         (startup "CAPREFS"
  427.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  428.             (help #caprefs-message)
  429.             (command caprefs-cmd)
  430.         )
  431.     )
  432.     )
  433.     
  434. ;   (if (or (exists "ClassAct.lha") (exists "ClassAct.lzx"))
  435. ;       (run "C:Delete T:ClassAct ALL"
  436. ;
  437. ;       (delete "T:ClassAct" (all)
  438. ;
  439. ;           (prompt #deleting-cltmp)
  440. ;       )
  441. ;   )
  442.  
  443.     (complete classact-complete))
  444.  
  445. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  446. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  447.  
  448. ; ************** Start of Mailcap build procedure (aemp-build_mailcap)
  449.  
  450. (procedure aemp-build_mailcap
  451.  
  452.     ((set
  453.         aem-mimetypes
  454.             (askoptions
  455.                 (prompt "Indicate those mime types/subtypes you want "
  456.                         "display programs for")
  457.                 (help   "Check which types/subtypes that you will specify "
  458.                         "a display program for.  If you specify the type/all "
  459.                         "option you must have a program that can determine "
  460.                         "the appropriate display subtype")
  461.                 (choices    "text/all"
  462.                             "images/all"
  463.                             "images/gif"
  464.                             "images/jpeg"
  465.                             "images/x-iff"
  466.                             "audio/all"
  467.                             "audio/basic"
  468.                             "video/all"
  469.                             "video/mpeg"))
  470.  
  471.         aem-curmailcap 0)
  472.  
  473.     (delete aem-mailcap_file)
  474.  
  475.     (while (<> 0 aem-mimetypes)
  476.         ((if (BITAND aem-mimetypes 1)
  477.             ((set
  478.                 aem-curmimet
  479.                     (select aem-curmailcap "text/*"
  480.                                            "images/*"
  481.                                            "images/gif"
  482.                                            "images/jpeg"
  483.                                            "images/x-iff"
  484.                                            "audio/*"
  485.                                            "audio/basic"
  486.                                            "video/*"
  487.                                            "video/mpeg")
  488.  
  489.                 aem-mimefile
  490.                     (askfile
  491.                         (prompt "Indicate program to display " aem-curmimet)
  492.                         (help   "Select the program in the file list that will "
  493.                                 "be used the display the file described by the "
  494.                                 "indicated mime type/subtype")
  495.                         (default ""))
  496.  
  497.                 aem-mimefile
  498.                     (askstring
  499.                         (prompt "Add the parameters required for the mime "
  500.                                 "display program you selected\n\n"
  501.                                 "You must always add '%s' to specify where "
  502.                                 "the file you are displaying goes.\n")
  503.                         (help   "You will need to add parmeters that may be "
  504.                                 "required by the display program that you "
  505.                                 "specified.  One required parameter required "
  506.                                 "by ALL programs is '%s' to specify where "
  507.                                 "the file name for the file you are "
  508.                                 "displaying goes.\n")
  509.                         (default (cat aem-mimefile " %s")))
  510.  
  511.                 aem-mimeonwb
  512.                     (askbool
  513.                         (prompt "Does the mime display program have to open "
  514.                                 "on the Workbench?"
  515.                         (help   "Some programs will always open on the "
  516.                                 "Workbench.  Others will open on their own "
  517.                                 "screen.  If your display program opens on "
  518.                                 "the Workbench, you must reply 'YES' to this "
  519.                                 "request.\n")))
  520.  
  521.                 aem-mimefile
  522.                     (if (= 1 aem-mimeonwb)
  523.                         (cat "WB;" aem-mimefile)
  524.                         ("%s" aem-mimefile)))
  525.  
  526.             (textfile
  527.                 (prompt "Creating .mailcap file")
  528.                 (help   "Creating .mailcap file")
  529.                 (dest   aem-mailcap_file)
  530.                 (include aem-mailcap_file)
  531.                 (append ("%s; \"%s\"\n" aem-curmimet aem-mimefile)))))
  532.         (set aem-curmailcap (+ 1 aem-curmailcap))
  533.         (set aem-mimetypes (shiftright aem-mimetypes 1))
  534.  
  535.     )))
  536. )
  537.  
  538. ; ************* End of Mailcap build procedure (aemp-build_mailcap)
  539.  
  540. ; ************* Start of Get User Icon procedure (aemp-get-users)
  541.  
  542. (procedure aemp-get-users
  543.  
  544. (set aem-userno 1)
  545. (set aem-username-1 ""
  546.      aem-username-2 ""
  547.      aem-username-3 ""
  548.      aem-username-4 ""
  549.      aem-username-5 ""
  550.      aem-username-6 ""
  551.      aem-username-7 ""
  552.      aem-username-8 ""
  553.      aem-username-9 "")
  554.  
  555. (if (<> 1 @pretend)
  556. (foreach @default-dest "#?.info"
  557.     ((set aem-iconnameln (strlen @each-name))
  558.     (set aem-iconname (substr @each-name 0 (- aem-iconnameln 5)))
  559.     (set aem-iconpath (tackon @default-dest aem-iconname))
  560.     (debug "@eachname is "@each-name)
  561.     (debug "aem-iconname is "aem-iconname)
  562.     (debug "aem-iconpath is "aem-iconpath)
  563.     ((iconinfo
  564.         (prompt "Getting Project Icon")
  565.         (dest aem-iconpath)
  566.         (getdefaulttool "aem-icontool"))
  567.     (debug "aem-icontool is " aem-icontool)
  568.     (debug "The value of 'aem-userno' is " aem-userno)
  569.     (if (= "AEMail" aem-icontool)
  570.         ((debug "aem-iconname is " aem-iconname)
  571.         (symbolset (cat "aem-username-" aem-userno) aem-iconname)
  572.         (set aem-userno (+ 1 aem-userno))))))))
  573. )
  574.  
  575. ; ************* End of Get User Icon procedure (aemp-get-users)
  576.  
  577.  
  578. (set exec-version (/ (getversion) 65536))
  579. (set avail-mem (+ (database "total-mem")))
  580. (set system-cpu (database "cpu"))
  581.  
  582. (set wb-version 0)
  583. (if (exists ("libs:version.library"))
  584.     ((set wb-version (/ (getversion ("libs:version.library")) 65536))))
  585.  
  586. (debug "The value of 'exec-version' is " exec-version)
  587. (debug "The value of 'wb-version' is " wb-version)
  588.  
  589. (set full-aem-name "AEMail Version 2.40")
  590.  
  591. (set
  592.     aem-INSTALL
  593.         (askchoice
  594.             (prompt "\n\nWhat type of AEMail Installion are you performing?\n")
  595.             (help   "Indicate whether this is a demo version of AEMail, "
  596.                     "a previously registered version of AEMail, "
  597.                     "or a new registered version of AEMail.  If it is "
  598.                     "a new registered version you will need to have your "
  599.                     "key code available.  You will be asked for it.")
  600.             (choices "A Demo Version"
  601.                      "A Previously Registered Version"
  602.                      "A New Registered Version")
  603.             (default 0)))
  604.  
  605. (set aem-Regfile "")
  606.  
  607. (if (= 1 aem-INSTALL)
  608.     ((if (= 2 (exists "AEMail2:" (noreq)))
  609.         (set aem-Regfile "AEMail2:.registration")
  610.         (if (= 2 (exists "AEMail:" (noreq)))
  611.             (set aem-Regfile "AEMail:.registration")))
  612.     (if (<> 1 (exists aem-Regfile (noreq)))  
  613.         (abort "No existing .registration file can not be found.\n\n"
  614.                "Re-install at the 'Demo' level and notify "
  615.                "jzachar@calweb.com to obtain correct key file."))
  616.     (copyfiles
  617.         (prompt "Copying .registration file to ram")
  618.         (source aem-Regfile)
  619.         (dest "RAM:")
  620.         (newname ".AEMregistration")
  621.         (optional "nofail"))
  622. ))
  623.  
  624. (set continue 0
  625.      aem-regkey ""
  626.      aem-regname ""
  627.      aem-aemr (tackon source-dir "AEMR"))
  628.  
  629. (if (= 2 aem-INSTALL)
  630.     ((while
  631.         (= continue 0)
  632.  
  633.         (set
  634.             aem-regkey
  635.                 (askstring
  636.                     (prompt "You are installing a registered version of "
  637.                             "AEMail.\n\n"
  638.                             "Please enter the key code provided with your "
  639.                             "copy of AEMail.")
  640.                     (help   "You must enter your key code EXACTLY as provided "
  641.                             "using the correct upper and lower case letters.")
  642.                     (default aem-regkey))
  643.  
  644.             aem-regname
  645.                 (askstring
  646.                     (prompt "Please enter the name you want AEMail registered "
  647.                             "under:")
  648.                     (help   "You must enter a registered name\n\n"))
  649.  
  650.             aem-regserno
  651.                 (run aem-aemr aem-regkey "\""aem-regname"\" RAM:"
  652.                 (safe)))
  653.  
  654.         (debug "The value of aem-aemr is "aem-aemr)
  655.         (debug "The value of aem-regkey is "aem-regkey)
  656.         (debug "The value of aem-regname is "aem-regname)
  657.         (debug "The value of aem-regserno is "aem-regserno)
  658.  
  659.         (if (> 100 aem-regserno)
  660.             ((if (= 1 aem-regserno)
  661.                 ((message "You did not enter either a key or registration "
  662.                          "name\n\nTry Again!")
  663.                 (set continue 0)))
  664.             (if (= 2 aem-regserno)
  665.                 ((message "You entered an incorrect key code\n\nTry Again!")
  666.                  (set continue 0)))
  667.             (if (= 50 aem-regserno)
  668.                 ((message "Failed to create .registration file\n\n"
  669.                           "Continuing as an unregistered version.  Contact "
  670.                           "jzachar@calweb.com for further instructions.")
  671.                  (set continue 1))))
  672.             (set continue
  673.                 (askbool
  674.                     (prompt "\nIs the following information correct?\n\n"
  675.                             "registration name: " aem-regname "\n"
  676.                             "    serial number: " aem-regserno "\n\n"
  677.                             "If not, you can repeat the registration process")
  678.  
  679.                     (help   "Check the serial number with the number on the "
  680.                             "provided information sheet.  If it or your "
  681.                             "registration name or incorrect you can select "
  682.                             "\"No, Enter Again\" or, if everything is all "
  683.                             "right, select \"Yes, Repeat Registration\"\n")
  684.                     (choices "Yes, Continue" "No, Repeat Registration")))))
  685.         (rename "RAM:.registration" "RAM:.AEMregistration")))
  686.  
  687.  
  688. (set
  689.     aem-name "AEMail"
  690.     aem-assign (cat aem-name ":")
  691.     aem-default-tcp 3)
  692.  
  693. (if (= 1 (exists "ENV:TermiteTCP.prefs" (noreq)))
  694.          (set aem-Termite 2
  695.               aem-default-tcp 3)
  696.          (set aem-Termite 0))
  697.  
  698. (if (= 2 (exists "AMITCP:bin" (noreq)))
  699.     (set aem-have-AMITCP 1
  700.          aem-default-tcp 1)
  701.     (set aem-have-AMITCP 0))
  702.  
  703. (if (= 2 (exists "Miami:" (noreq)))
  704.     (set aem-have-MIAMI 1
  705.          aem-default-tcp 0)
  706.     (set aem-have-MIAMI 0))
  707.  
  708. (set continue 0)
  709.  
  710. (while
  711.     (= continue 0)
  712.     ((set
  713.         aem-TCPIP
  714.             (askchoice
  715.                 (prompt "Indicate which TCP/IP software you are using")
  716.                 (help   "Information on the TCP/IP software you are using "
  717.                         "is needed to determine which StartNet and StopNet "
  718.                         "are used.  If you choose 'Miami' you must have an "
  719.                         "ASSIGN for 'Miami:'.  If you select 'AmiTCP', you "
  720.                         "must have an 'AMITCP:bin' directory.  'Termite TCP' "
  721.                         "and 'Other' will not assign a StartNet or StopNet "
  722.                         "script".
  723.                 (choices "Miami"
  724.                          "AmiTCP"
  725.                          "Termite TCP"
  726.                          "Other")
  727.                 (default aem-default-tcp))))
  728.     (if (= 0 aem-TCPIP)
  729.         (if (= 1 aem-have-MIAMI)
  730.             (set aem-have-AMITCP 0
  731.                  aem-Termite 0
  732.                  continue 1)
  733.             ((set continue
  734.                 (askbool
  735.                     (prompt "You do not have an ASSIGN for the Miami Directory\n"
  736.                             "Do you wish to continue without the ASSIGN or "
  737.                             "select another TCP/IP stack?"
  738.                     (help cd devl  "If you select 'Continue' you will not be able to "
  739.                             "use the 'startnet.miami' or 'stopnet.miami' scripts "
  740.                             "unless you load Miami before starting AEMail")
  741.                     (choices "Continue" "Select another stack"))))
  742.             (if (= 1 continue)
  743.                 (set aem-have-MIAMI 1
  744.                      aem-have-AMITCP 0
  745.                      aem-Termite 0))))
  746.         (if (= 1 aem-TCPIP)
  747.             (if (= 1 aem-have-AMITCP)
  748.                 (set aem-have-MIAMI 0
  749.                      aem-Termite 0
  750.                      continue 1)
  751.                 (message "You do not have an ASSIGN for 'AMITCP:bin' "
  752.                          "If you select 'Proceed' you can select "
  753.                          "another TCP/IP stack; otherwise, you should "
  754.                          "abort the install."
  755.                 (help   "If you are using AmiTCP you must have an "
  756.                         "ASSIGN for 'AmiTCP:' and a 'AmiTCP:bin' "
  757.                         "directory.")))
  758.  
  759.             (set
  760.                 aem-have-MIAMI 0
  761.                 aem-have-AMITCP 0
  762.                 continue 1)))))
  763.  
  764. (debug "The value of 'aem-TCPIP' is " aem-TCPIP)
  765.  
  766. (set aem-haveenv 0)
  767. (if (= 1 (exists "ENV:AEMail_Dir" (noreq)))
  768.     ((set
  769.         @default-dest (getenv ("AEMail_Dir"))
  770.         len (strlen @default-dest)
  771.         aem-haveenv 1)
  772.      (if (= "\n" (substr @default-dest (- len 1) 1))
  773.          (set @default-dest (substr @default-dest 0 (- len 1)))))
  774.     (set @default-dest
  775.         (if (= 2 (exists "AEMail2:" (noreq)))
  776.             (expandpath "AEMail2:")
  777.             ((if (= 1 aem-have-AMITCP)
  778.                 (expandpath "AMITCP:bin")
  779.                 (@default-dest))))))
  780.  
  781. (set aem-oldver "")
  782. (if (= 1 (exists "ENV:AEMail_Ver" (noreq)))
  783.     ((set
  784.         aem-oldver (getenv ("AEMail_Ver"))
  785.         len (strlen aem-oldver))
  786.      (if (= "\n" (substr aem-oldver (- len 1) 1))
  787.          (set aem-oldver (substr aem-oldver 0 (- len 1))))))
  788.  
  789. (set aem-updateonly 0)
  790.  
  791. (if (= aem-oldver aem-verstr)
  792.     (if (= 1 aem-haveenv)
  793.         (set aem-updateonly
  794.             (askbool
  795.                 (prompt "\n\nYou have previously installed version " aem-verstr
  796.                         " of AEMail.  Do you wish to add and or update your " 
  797.                         "users only or do a full install?")
  798.                 (help   "Since you have already installed this version of "
  799.                         "AEMail you do not have to re-install the program or "
  800.                         "the documentation files unless you are making changes "
  801.                         "to the way they were installed.  If you are just "
  802.                         "adding or changing a user, you can bypass the full "
  803.                         "install.")
  804.                 (choices "Update Users Only"  "Full Install")))))
  805.  
  806. (debug "The value of '@default-dest' is " @default-dest)
  807. (debug "The value of 'aem-oldver' is " aem-oldver)
  808. (debug "The value of 'aem-haveenv' is " aem-haveenv)
  809. (debug "The value of 'aem-updateonly' is " aem-updateonly)
  810. (debug "The value of 'aem-verstr' is " aem-verstr)
  811.  
  812. (if (= "AEMail" (fileonly @default-dest))
  813.     (set @default-dest (pathonly @default-dest)))
  814.  
  815. (debug "The value of '@default-dest' is " @default-dest)
  816.  
  817. (if (= 0 aem-updateonly)
  818. (if (= 2 @user-level)
  819.  
  820.     (set
  821.     ;;
  822.     ;; Sets up where to place AEMail program
  823.     ;;
  824.     @default-dest
  825.         (askdir
  826.             (prompt "Enter the drawer in which you want AEMail installed\n"
  827.                     "A drawer called AEMail will be created "
  828.                     "if it does not already exist (except if AmiTCP:bin is "
  829.                     "specified)")
  830.             (help   "If you are using AmiTCP, AEMail should be installed in "
  831.                     "'AmiTCP:bin'\n\n"
  832.                     "However, you may install it anywhere you like\n\n"
  833.                     "If it is not 'AmiTCP:bin' a drawer called 'AEMail' "
  834.                     "will be created.\n")
  835.             (default @default-dest)
  836.             (newpath)))))
  837.  
  838. (debug "The value of '@default-dest' is " @default-dest)
  839.  
  840.  
  841. (if (= 1 aem-have-AMITCP)
  842.     (if (<> @default-dest (expandpath "AMITCP:bin"))
  843.         (set aem-have-AMITCP 0)))
  844.  
  845. (if (= "AEMail" (fileonly @default-dest))
  846.     (set @default-dest (pathonly @default-dest)))
  847.  
  848. (debug "The value of '@default-dest' is " @default-dest)
  849.  
  850. (if (= 0 aem-have-AMITCP)
  851.     (set @default-dest (tackon @default-dest "AEMail")))
  852.  
  853. (debug "The value of '@default-dest' is " @default-dest)
  854.  
  855. (if (= 0 (exists @default-dest (noreq)))
  856.     ((makedir @default-dest (infos))
  857.      (onerror ((delete @default-dest
  858.                 (prompt "Deleting AEMail directory")
  859.                 (help "Deleting AEMail directory")
  860.                 (optional "force")
  861.                 (safe)
  862.                 (all)
  863.                 (infos))
  864.               (delete "T:AEMfiles"
  865.                 (prompt "Deleting T: AEMail files")
  866.                 (optional "force")
  867.                 (safe)
  868.                 (all)
  869.                 (infos)))))
  870.      (onerror  (delete "T:AEMfiles"
  871.                 (prompt "Deleting T: AEMail files")
  872.                 (optional "force")
  873.                 (safe)
  874.                 (all)
  875.                 (infos))))
  876.  
  877. (set aem-default-dest @default-dest)
  878.  
  879. (set
  880.  
  881.     aem-dft-maildir (if (= 2 (exists aem-assign (noreq)))
  882.         ((getassign aem-name))
  883.         (""))
  884.  
  885.     aem-mail-name (if (= 2 (exists aem-assign (noreq)))
  886.         (fileonly(getassign aem-name))
  887.         ("AEMail_Mail"))
  888.   )
  889.  
  890. (debug "aem-dft-maildir = " aem-dft-maildir)
  891. (debug "aem-mail-name = " aem-mail-name)
  892.  
  893. ; Use ENV:PAGER program, Multiview, or copy "More" to T: for use
  894.  
  895. (set
  896.  pager-cmd (if (exists "ENV:PAGER" (noreq)) (getenv "PAGER"))
  897.  pager-cmd
  898.     (if pager-cmd pager-cmd
  899.         (if (= 1 (exists "SYS:Utilities/Multiview" (noreq)))
  900.             ("SYS:Utilities/Multiview")
  901.             ((copyfiles
  902.                 (prompt "Copying " (tackon source-dir "c/More") " to T: for use")
  903.                 (source (tackon source-dir "c/More"))
  904.                 (dest   "T:")
  905.                 (safe)
  906.                 (optional "nofail"))
  907.                 "T:More"))))
  908.  
  909. (debug "pager command is " pager-cmd)
  910.  
  911. (makedir "T:AEMfiles" (safe))
  912. (makedir "T:AEMfiles/ARexx" (safe))
  913.  
  914. (copyfiles
  915.     (prompt "Copying AEMail.readme to T:")
  916.     (source (tackon source-dir "AEMail.readme"))
  917.     (dest   "T:AEMfiles")
  918.     (safe)
  919.     (infos))
  920.  
  921. (copyfiles
  922.     (prompt "Copying AEMail Project icon to T:")
  923.     (source (tackon source-dir "AEMail.inf"))
  924.     (newname "AEMail.info")
  925.     (safe)
  926.     (dest   "T:AEMfiles"))
  927.  
  928. (copyfiles
  929.     (prompt "Copying default AEMail mailcap file to T:")
  930.     (source (tackon source-dir "mailcap"))
  931.     (safe)
  932.     (dest   "T:AEMfiles"))
  933.  
  934. (if (= 0 aem-updateonly) (
  935. (copyfiles
  936.     (prompt "Copying LHA to T:")
  937.     (source (tackon source-dir "c/LHex"))
  938.     (safe)
  939.     (dest   "T:"))
  940.  
  941. (copyfiles
  942.     (prompt "Copying AEMail to " @default-dest)
  943.     (source (tackon source-dir "AEMail"))
  944.     (dest   @default-dest))
  945.  
  946. (if (= 1 (exists (tackon source-dir "AEMR") (noreq)))
  947.     (copyfiles
  948.         (prompt "Copying Registration program to T:")
  949.         (source (tackon source-dir "AEMR"))
  950.         (dest   "T:AEMfiles")))
  951.  
  952. (copyfiles
  953.     (prompt "copy registration.form to " @default-dest)
  954.     (source (tackon source-dir "registration.form"))
  955.     (dest   @default-dest)
  956.     (noposition)
  957.     (infos))
  958.  
  959. (if (<> 1 (exists (tackon @default-dest "startnet.miami") (noreq)))
  960.     (copyfiles
  961.         (prompt "Copy Miami Start Net script to " @default-dest)
  962.         (source (tackon source-dir "startnet.miami"))
  963.         (dest   @default-dest)))
  964.  
  965. (if (<> 1 (exists (tackon @default-dest "stopnet.miami") (noreq)))
  966.     (copyfiles
  967.         (prompt "Copy Miami Stop Net script to " @default-dest)
  968.         (source (tackon source-dir "stopnet.miami"))
  969.         (dest   @default-dest)))
  970.  
  971. (set AEM-default-dest @default-dest)
  972.  
  973. (askdisk 
  974.     (prompt "Please insert \""aem-dsk2"\" in any floppy drive.")
  975.     (help  @askdisk-help)
  976.     (dest aem-dsk2)
  977.     (assigns))
  978.  
  979. ; (welcome #welcome)
  980.  
  981. (set #classact-source (cat aem-dsk2 ":")) 
  982.  
  983. (debug "The value of '#classact-source' is " #classact-source)
  984.  
  985. ; Only install ClassAct if exec less then 3.5
  986. ; With OS 3.5 ClassAct is part of the system
  987. ; You are given the option of not installing ClassAct
  988. ; if it is already installed 
  989.  
  990. (if (< wb-version version_3_5)
  991.     ((set
  992.         aem-installca
  993.             (askbool
  994.                 (prompt "\nDo you want to install ClassAct?")
  995.                 (help   "If you already have ClassAct installed on your "
  996.                         "system you can reply 'NO' to this message.")
  997.                 (choices "Yes" "No")))
  998.     (if (= 1 aem-installca)
  999.         (install-classact))))
  1000.  
  1001. (set @default-dest AEM-default-dest)
  1002.   
  1003. (set
  1004.     doc-files (cat aem-dsk2 ":Documentation.lha")
  1005.     rexx-files (cat aem-dsk2 ":ARexx.lha"))
  1006.  
  1007. (if (= 1 (exists doc-files (noreq)))
  1008. ((set
  1009.     doc-files ("\"%s\"" doc-files)
  1010.     rexx-files ("\"%s\"" rexx-files))
  1011.  
  1012. (debug "The value of 'doc-files' is " doc-files)
  1013. (debug "The value of 'rexx-files' is " rexx-files)
  1014.  
  1015. (message "\n\nSelect PROCEED to decompress the AEMail Documentation and "
  1016.     "ARexx files to RAM\n\n"
  1017.     "Be patient, this will take a while\n\n"
  1018.     "If you are installing from diskette, the decompression "
  1019.     "will take approx 3 minutes\n\n"
  1020.     "From your hard drive, the decompression will take approx 20 seconds")
  1021.  
  1022. (set aem-lha
  1023.     (run "T:lhex -fwT:AEMfiles x " doc-files " >NIL:" (safe)))
  1024. (set aem-lha
  1025.     (run "T:lhex -fw=T:AEMfiles/ARexx x " rexx-files " >NIL:" (safe)))
  1026.  
  1027. (delete 
  1028.     "T:lhex"
  1029.     (prompt "Deleting T:lha file")
  1030.     (optional "force")
  1031.     (safe)))
  1032.  
  1033. (
  1034. (copyfiles
  1035.     (prompt "Copying AEMail.guide to T:AEMfiles")
  1036.     (source (tackon source-dir "Documentation/AEMail.guide"))
  1037.     (dest   "T:AEMfiles")
  1038.     (safe)
  1039.     (infos))
  1040.  
  1041. (copyfiles
  1042.     (prompt "Copying AEMail.doc to T:AEMfiles")
  1043.     (source (tackon source-dir "Documentation/AEMail.doc"))
  1044.     (dest   "T:AEMfiles")
  1045.     (safe)
  1046.     (infos))
  1047. (copyfiles
  1048.     (prompt "Copying email.txt to T:AEMfiles")
  1049.     (source (tackon source-dir "Documentation/email.txt"))
  1050.     (dest   "T:AEMfiles")
  1051.     (safe)
  1052.     (infos))
  1053.  
  1054. (copyfiles
  1055.     (prompt "copy ARexx files to T:AEMfiles/ARexx")
  1056.     (source (tackon source-dir "ARexx/"))
  1057.     (dest   "T:AEMfiles/ARexx/")
  1058.     (all)
  1059.     (noposition)
  1060.     (safe)
  1061.     (infos))
  1062. ))
  1063.  
  1064. (if (< exec-version version_3_0)
  1065.     (tooltype
  1066.         (dest "T:AEMfiles/AEMail.guide")
  1067.         (setdefaulttool "AmigaGuide"))
  1068.     (tooltype
  1069.         (dest "T:AEMfiles/AEMail.guide")
  1070.         (setdefaulttool "MultiView")))
  1071. (set
  1072.     aem-docs-dir-dft (tackon @default-dest "documentation")
  1073.     aem-rexx-dir-dft (tackon @default-dest "ARexx"))
  1074.  
  1075. (if (< 0 @user-level)
  1076.     (set
  1077.       aem-docs
  1078.         (askoptions
  1079.             (prompt "Select which AEMail documentation files you want copied\n\n")
  1080.             (help @askoptions-help)
  1081.             (choices "AEMail.readme"
  1082.                      "AEMail.doc"
  1083.                      "AEMail.guide"
  1084.                      "email.txt"
  1085.                      )
  1086.             (default 15)))
  1087.  
  1088.     (set aem-docs 15))
  1089.  
  1090.  
  1091. (if (= 2 @user-level)
  1092.     (if (<> 0 aem-docs)
  1093.         (set
  1094.           aem-docs-dir
  1095.             (askdir
  1096.                 (prompt "Which directory do you want the documentation files "
  1097.                         "copied to\n")
  1098.                 (help   "You may select a different directory than the " 
  1099.                         "'documentation' sub-directory in your program's "
  1100.                         "directory to copy the documentation files to.\n")
  1101.                 (newpath)
  1102.                 (default aem-docs-dir-dft))))
  1103.     (set aem-docs-dir aem-docs-dir-dft)
  1104. )
  1105.  
  1106. (if (= 2 @user-level)
  1107.         (set
  1108.           aem-rexx-dir
  1109.             (askdir
  1110.                 (prompt "Which directory do you want the ARexx files "
  1111.                         "copied to\n")
  1112.                 (help   "You may select a different directory than the " 
  1113.                         "'ARexx' sub-directory in your program's "
  1114.                         "directory to copy the ARexx files to.\n\n"
  1115.                         "One possibility is yto copy them directly into "
  1116.                         "the Rexx: directory.")
  1117.                 (newpath)
  1118.                 (default aem-rexx-dir-dft)))
  1119.     (set aem-rexx-dir aem-rexx-dir-dft)
  1120. )
  1121.  
  1122. (if (<> 2 (exists aem-docs-dir (noreq)))
  1123.     (makedir aem-docs-dir (infos)))
  1124.  
  1125. (if (<> 2 (exists aem-rexx-dir (noreq)))
  1126.     (makedir aem-rexx-dir (infos)))
  1127.  
  1128. (if (= 1 (exists (tackon @default-dest "AEMail.readme") (noreq)))
  1129.     (delete (tackon @default-dest "AEMail.readme")
  1130.         (prompt "Deleting old AEMail.readme file")
  1131.         (infos)))
  1132.  
  1133. (if (= 1 (exists (tackon aem-docs-dir "AEMail.readme") (noreq)))
  1134.     (delete (tackon aem-docs-dir "AEMail.readme")
  1135.         (prompt "Deleting old AEMail.readme file")
  1136.         (infos)))
  1137.  
  1138. (if (= 1 (exists (tackon @default-dest "AEMail.doc") (noreq)))
  1139.     (delete (tackon @default-dest "AEMail.doc")
  1140.         (prompt "Deleting old AEMail.doc file")
  1141.         (infos)))
  1142.  
  1143. (if (= 1 (exists (tackon @default-dest "AEMail.guide") (noreq)))
  1144.     (delete (tackon @default-dest "AEMail.guide")
  1145.         (prompt "Deleting old AEMail.guide file")
  1146.         (infos)))
  1147.  
  1148. (set aem-readtool
  1149.     (if (= pager-cmd "T:More")
  1150.         ("more")
  1151.         (pager-cmd)))
  1152.  
  1153.  
  1154. (if (<> 0 aem-docs)(
  1155.     (if (BITAND aem-docs 1)
  1156.         ((copyfiles
  1157.             (prompt "Copying AEMail.readme file to " @default-dest)
  1158.             (source "T:AEMfiles/AEMail.readme")
  1159.             (dest   @default-dest)
  1160.             (infos))
  1161.         (tooltype
  1162.             (dest (tackon @default-dest "AEMail.readme"))
  1163.             (noposition)
  1164.             (setdefaulttool aem-readtool))))       
  1165.  
  1166.     (if (BITAND aem-docs 2)
  1167.         ((copyfiles
  1168.             (prompt "Copying AEMail.doc file to " aem-docs-dir)
  1169.             (source "T:AEMfiles/AEMail.doc")
  1170.             (dest   aem-docs-dir)
  1171.             (infos))
  1172.         (tooltype
  1173.             (dest (tackon aem-docs-dir "AEMail.doc"))
  1174.             (noposition)
  1175.             (setdefaulttool "more"))))       
  1176.  
  1177.     (if (BITAND aem-docs 4)
  1178.         ((copyfiles
  1179.             (prompt "Copying AEMail.guide file to " aem-docs-dir)
  1180.             (source "T:AEMfiles/AEMail.guide")
  1181.             (dest   aem-docs-dir)
  1182.             (infos))
  1183.         (tooltype
  1184.             (dest (tackon aem-docs-dir "AEMail.guide"))
  1185.             (noposition))))
  1186.  
  1187.     (if (BITAND aem-docs 8)
  1188.         ((copyfiles
  1189.             (prompt "Copying email.txt file to " aem-docs-dir)
  1190.             (source "T:AEMfiles/email.txt")
  1191.             (dest   aem-docs-dir)
  1192.             (infos))
  1193.         (tooltype
  1194.             (dest (tackon aem-docs-dir "email.txt"))
  1195.             (noposition)
  1196.             (setdefaulttool "more"))))       
  1197.  
  1198. ))
  1199.  
  1200.  
  1201. (copyfiles
  1202.     (prompt "copy ARexx files to " aem-rexx-dir)
  1203.     (source "T:AEMfiles/ARexx/")
  1204.     (dest   aem-rexx-dir)
  1205.     (all)
  1206.     (noposition)
  1207.     (infos))))
  1208.  
  1209. (if (= 1 (exists "RAM:.AEMregistration" (noreq)))
  1210.     ((copyfiles
  1211.         (prompt "creating .registration file")
  1212.         (source "RAM:.AEMregistration")
  1213.         (dest @default-dest)
  1214.         (newname ".registration"))
  1215.     (delete
  1216.         "RAM:.AEMregistration"
  1217.         (prompt "Deleting RAM:.AEMregistration")
  1218.         (optional "force")
  1219.         (safe))))   
  1220.  
  1221.  
  1222.  
  1223.  
  1224. (set aem-modify '')
  1225.  
  1226. (if (< aem-oldver "2.00")
  1227.     (set
  1228.         aem-nousers 1
  1229.         aem-startuser 1
  1230.         aem-usermsg "")
  1231.     ((aemp-get-users)
  1232.  
  1233.     (set aem-modify " or updated"
  1234.         aem-startuser 0
  1235.         aem-usermsg "\n\nIf you reply with 0 no users will be added or updated."
  1236.         aem-nousers
  1237.         (askbool
  1238.             (prompt "You have previously installed a version of AEMail "
  1239.                 "that's 2.00 or above with the users listed below.\n"
  1240.                 "\nDo you wish to add, delete, and or update your "
  1241.                     "users or accept the ones you have?\n"
  1242.                 "\n"aem-username-1
  1243.                 "\n"aem-username-2
  1244.                 "\n"aem-username-3
  1245.                 "\n"aem-username-4
  1246.                 "\n"aem-username-5
  1247.                 "\n"aem-username-6
  1248.                 "\n"aem-username-7
  1249.                 "\n"aem-username-8
  1250.                 "\n"aem-username-9)
  1251.            (help   "\n\nSince you have already installed a version of "
  1252.                     "AEMail that's 2.00 or above you have established your "
  1253.                     "users.\n\nYou do not have to re-do the user installation "
  1254.                     "unless you are making changes to the users or adding "
  1255.                     "a new one.")
  1256.             (choices "Add/Delete/Update Users"  "Accept Current Users")))))
  1257.  
  1258. (debug "The value of 'aem-userno' is " aem-userno)
  1259.  
  1260. (set aem-delete-users 0)
  1261.  
  1262. (if (= 1 aem-nousers)
  1263. ((if (<> 0 aem-userno)
  1264.     (set aem-delete-users
  1265.         (askbool
  1266.             (prompt "\nDo you wish to delete any users?")
  1267.             (help   "\n\nIf you wish to delete any of your users reply "
  1268.                     "Yes to this message\n")
  1269.             (choices "Yes" "No"))))
  1270.  
  1271. (debug "aem-delete-users is " aem-delete-users)
  1272. (while (= 1 aem-delete-users)
  1273.        ((aemp-get-users)
  1274.         (set aem-userpick
  1275.             (askchoice
  1276.                 (prompt "Select the user you wish to delete")
  1277.                 (help   "Indicate the user you want deleted")
  1278.                 (choices
  1279.                     aem-username-1
  1280.                     aem-username-2
  1281.                     aem-username-3
  1282.                     aem-username-4
  1283.                     aem-username-5
  1284.                     aem-username-6
  1285.                     aem-username-7
  1286.                     aem-username-8
  1287.                     aem-username-9)))
  1288.         (select aem-userpick
  1289.             (set aem-iconname-dflt aem-username-1)
  1290.             (set aem-iconname-dflt aem-username-2)
  1291.             (set aem-iconname-dflt aem-username-3)
  1292.             (set aem-iconname-dflt aem-username-4)
  1293.             (set aem-iconname-dflt aem-username-5)
  1294.             (set aem-iconname-dflt aem-username-6)
  1295.             (set aem-iconname-dflt aem-username-7)
  1296.             (set aem-iconname-dflt aem-username-8)
  1297.             (set aem-iconname-dflt aem-username-9))
  1298.         (iconinfo
  1299.             (prompt "Get Configuration File and Mail Directory")
  1300.             (dest (tackon @default-dest aem-iconname-dflt))
  1301.             ( gettooltype "CONFIG" "aem-config-del")
  1302.             ( gettooltype "MAIL_DIR" "aem-mail_dir-del"))
  1303.         (delete (tackon @default-dest (cat aem-iconname-dflt ".info")) (confirm)
  1304.             (prompt "Deleting " aem-iconname-dflt".info")
  1305.             (help   "Do you want to delete " aem-iconname-dflt".info?"))
  1306.         (set aem-yesno
  1307.             (askbool
  1308.                 (prompt aem-iconname-dflt " has a configuration file called "
  1309.                         aem-config-del ".\n\nDo you want this file deleted?")
  1310.                 (help   "Unless you want to use this configuration file again, "
  1311.                         "You will want to delete it.")
  1312.                 (choices "Yes" "No")))
  1313.         (if (= 1 aem-yesno)
  1314.             (delete aem-config-del
  1315.                 (prompt "Deleting " aem-config-del)
  1316.                 (infos)))
  1317.         (set aem-yesno
  1318.             (askbool
  1319.                 (prompt aem-iconname-dflt " has a Mail Directory called "
  1320.                         aem-mail_dir-del ".\n\nDo you want this directory deleted?")
  1321.                 (help   "If this mail directory is being used by another user "
  1322.                         "you should not delete it.")
  1323.                 (choices "Yes" "No")))
  1324.         (if (= 1 aem-yesno)
  1325.             (delete aem-mail_dir-del
  1326.                 (prompt "Deleting " aem-mail_dir-del)
  1327.                 (infos)
  1328.                 (all)))
  1329.         (set aem-delete-users
  1330.             (askbool
  1331.                 (prompt "\nDo you wish to delete another user?")
  1332.                 (help   "\n\nIf you wish to delete another user reply "
  1333.                         "Yes to this message\n")
  1334.                 (choices "Yes" "No")))))))
  1335.  
  1336. (set aem-maxusers aem-nousers)
  1337. (if (= aem-nousers 1)
  1338.     (set aem-maxusers
  1339.         (asknumber
  1340.             (prompt "Please enter the number of users that will be added"
  1341.                     aem-modify ".  Each user will have a different "
  1342.                     "email address and a separate "
  1343.                     "project icon and configuration file will be created for "
  1344.                     "each user."
  1345.                     aem-usermsg)
  1346.             (help   "You can have up to 10 separate users of AEMail with different "
  1347.                     "email addresses.  Each user must have their own configuration "
  1348.                     "file (which you will be asked for later) and separate project "
  1349.                     "icons.  Each user may have their own or a common storage area "
  1350.                     "for their mail.")
  1351.             (range  aem-startuser 10)
  1352.             (default 1))))
  1353.  
  1354. (set aem-curuser 1)
  1355. (set aem-default-editor "")
  1356.  
  1357. (while 
  1358.     (<= aem-curuser aem-maxusers)
  1359.     (
  1360.  
  1361. (aemp-get-users)
  1362.  
  1363. (set continue 0)
  1364.  
  1365. (while (= continue 0)
  1366.  
  1367. (set aem-userpick
  1368.     (askchoice
  1369.         (prompt "Select the name of the icon you want this user to have"
  1370.                 "\n\nIf you are updating a user, select the name the user "
  1371.                 "currently has")
  1372.         (help "Indicate the icon you want to use")
  1373.         (choices
  1374.             "Create new icon"
  1375.             aem-username-1
  1376.             aem-username-2
  1377.             aem-username-3
  1378.             aem-username-4
  1379.             aem-username-5
  1380.             aem-username-6
  1381.             aem-username-7
  1382.             aem-username-8
  1383.             aem-username-9)))
  1384.     
  1385. (select aem-userpick
  1386.     (set aem-iconname-dflt (cat "AEMail_User_"aem-userno))
  1387.     (set aem-iconname-dflt aem-username-1)
  1388.     (set aem-iconname-dflt aem-username-2)
  1389.     (set aem-iconname-dflt aem-username-3)
  1390.     (set aem-iconname-dflt aem-username-4)
  1391.     (set aem-iconname-dflt aem-username-5)
  1392.     (set aem-iconname-dflt aem-username-6)
  1393.     (set aem-iconname-dflt aem-username-7)
  1394.     (set aem-iconname-dflt aem-username-8)
  1395.     (set aem-iconname-dflt aem-username-9))
  1396.  
  1397.     ((set aem-iconname
  1398.         (askstring
  1399.             (prompt "\nEnter (confirm) the name of the icon that you want your "
  1400.                     "user to have.  A project icon will be created with that "
  1401.                     "name if it does not already exists."
  1402.                     "\n\nYou will be told if an icon with that name already "
  1403.                     "exists or not and you will be asked to confirm that that "
  1404.                     "name is the one you want.\n\n"
  1405.                     "DO NOT PLACE THE .info SUFFIX ON THE NAME")
  1406.             (help   "You must use icon names that are unique.  Any name may be "
  1407.                     "used.  If the name currently exists and you want to keep "
  1408.                     "it, it is assumed that you are updating an icon from an "
  1409.                     "older installation of AEMail.")
  1410.             (default aem-iconname-dflt)))
  1411.  
  1412.     (set aem-iconnameln (strlen aem-iconname))
  1413.  
  1414.     (debug "aem-iconname is " aem-iconname)
  1415.     (debug "aem-iconnameln is " aem-iconnameln)
  1416.             
  1417.     (if (> aem-iconnameln 5)
  1418.         (set aem-iconpref (substr aem-iconname (- aem-iconnameln 5)))
  1419.         (set aem-iconpref ""))
  1420.  
  1421.     (debug "aem-iconpref is " aem-iconpref)
  1422.  
  1423.     (if (= aem-iconpref ".info")
  1424.         (set aem-iconname (substr aem-iconname 0 (- aem-iconnameln 5))))            
  1425.     
  1426.     (debug "aem-iconname is " aem-iconname)
  1427.  
  1428.     (set aem-iconname-info (cat aem-iconname ".info"))
  1429.     
  1430.     (debug "aem-iconname is " aem-iconname)
  1431.     (debug "aem-iconname-info is " aem-iconname-info)
  1432.  
  1433.     (if (= 1 (exists (tackon @default-dest aem-iconname-info) (noreq)))
  1434.         (set aem-existmsg "does exist"
  1435.              aem-existmsg2 
  1436.                 "since a project icon already exists, it will not be created"
  1437.              aem-haveicon 1)
  1438.         (set aem-existmsg "does not exist"
  1439.              aem-existmsg2 "a project icon will be created with that name"
  1440.              aem-haveicon 0))
  1441.  
  1442.     (set aem-defaulttool "AEMail"
  1443.          aem-config ""
  1444.          aem-mail_dir ""
  1445.          aem-passprotect ""
  1446.          aem-options_1 ""
  1447.          aem-options_2 ""
  1448.          aem-options_3 ""
  1449.          aem-options_4 ""
  1450.          aem-options_5 ""
  1451.         aem-interlace ""
  1452.         aem-username ""
  1453.         aem-password ""
  1454.         aem-from ""
  1455.         aem-replyto ""
  1456.         aem-organization ""
  1457.         aem-realname ""
  1458.         aem-domain ""
  1459.         aem-popserver ""
  1460.         aem-smtpserver ""
  1461.         aem-editor ""
  1462.         aem-startnet ""
  1463.         aem-stopnet "")
  1464.  
  1465.     (if (= "" aem-default-editor)
  1466.         (set aem-default-editor aem-editor))
  1467.  
  1468.     (set aem-iconpath (tackon @default-dest aem-iconname))
  1469.  
  1470.     (debug "'aem-iconpath' is " aem-iconpath)
  1471.  
  1472.     (if (= 1 aem-haveicon)
  1473.        ((iconinfo
  1474.             (prompt "Checking icon") 
  1475.             (dest aem-iconpath)
  1476.             ( gettooltype "CONFIG" "aem-config")
  1477.             ( gettooltype "MAIL_DIR" "aem-mail_dir")
  1478.             ( gettooltype "INTERLACE" "aem-interlace")
  1479.             ( gettooltype "USERID" "aem-username")
  1480.             ( gettooltype "PASSWRD" "aem-password")
  1481.             ( gettooltype "REALNAME" "aem-realname")
  1482.             ( gettooltype "FROM" "aem-from")
  1483.             ( gettooltype "REPLYTO" "aem-replyto")
  1484.             ( gettooltype "ORGANIZATION" "aem-organization")
  1485.             ( gettooltype "DOMAIN" "aem-domain")
  1486.             ( gettooltype "POP_SERVER" "aem-popserver")
  1487.             ( gettooltype "SMTP_SERVER" "aem-smtpserver")
  1488.             ( gettooltype "EDITOR" "aem-editor")
  1489.             ( gettooltype "STARTNET" "aem-startnet")
  1490.             ( gettooltype "STOPNET" "aem-stopnet")
  1491.             ( gettooltype "DELETEMAIL" "aem-options_1")
  1492.             ( gettooltype "STRIPDUPS" "aem-options_2")
  1493.             ( gettooltype "FULLHEADER" "aem-options_3")
  1494.             ( gettooltype "HDRINREPLY" "aem-options_4")
  1495.             ( gettooltype "AUTOCONNECT" "aem-options_5")
  1496.             ( gettooltype "PASSPROTECT" "aem-passprotect")
  1497.  
  1498.             ( getdefaulttool "aem-defaulttool"))))
  1499.  
  1500.     (debug "'aem-defaulttool' is " aem-defaulttool)
  1501.     (debug "'aem-config' is " aem-config)
  1502.     (debug "'aem-mail_dir' is " aem-mail_dir)
  1503.  
  1504.     (if (<> "" (pathonly aem-config))
  1505.         (set aem-config (tackon @default-dest aem-config))) 
  1506.     
  1507.     (debug "config with path is " aem-config)
  1508.  
  1509.     (set aem-badicon 0)
  1510.  
  1511.     (if (= 1 aem-haveicon)
  1512.         (if (<> "AEMail" aem-iconname)
  1513.             (if (<> "AEMail" aem-defaulttool)
  1514.                 (set aem-badicon 1))
  1515.             (if (= "JUNK" aem-defaulttool)
  1516.                 (set aem-haveicon 0))))
  1517.  
  1518.     (if (= 1 aem-badicon)
  1519.         (message "\n\nAn icon for \""aem-iconname"\" does exist but it is "
  1520.                  "not a Project icon for AEMail.  If you picked an icon "
  1521.                  "name that is used for another program you can not use "
  1522.                  "it for AEMail.\n\n"
  1523.                  "Selecting 'Proceed' will ask you to re-enter the icon " 
  1524.                  "name.")
  1525.        
  1526.         (set continue
  1527.             (askbool
  1528.                 (prompt "\n\nAn icon for \""aem-iconname"\" "aem-existmsg".\n\n"
  1529.                         "Replying 'Yes' accepts the icon name and "aem-existmsg2
  1530.                         ".\n\nReplying 'No' will ask you to reenter "
  1531.                         "the icon name.")
  1532.                 (help   "A 'no' response will allow you to enter a new "
  1533.                         "icon name.  If it exists, it must be a Project icon "
  1534.                         "for AEMail.")
  1535.                 (default 1))))
  1536.     ))
  1537.  
  1538. (if (= 0 aem-haveicon)
  1539.     (copyfiles
  1540.         (prompt "Copying AEMail.info to " @default-dest)
  1541.         (source "T:AEMfiles/AEMail.info")
  1542.         (newname aem-iconname-info)
  1543.         (dest   @default-dest)))
  1544.  
  1545. (tooltype
  1546.     (prompt "Setting Project icon default tool")
  1547.     (dest aem-iconpath)
  1548.     (setposition -1 -1)
  1549.     (setdefaulttool "AEMail"))
  1550.  
  1551. (set aem-changecnfg 0)
  1552.  
  1553. (set aem-config-dflt (cat aem-iconname ".cnfg"))
  1554.  
  1555. (if (= 0 aem-updateonly)
  1556. (if (= 1 aem-curuser)
  1557.     (if (= "" aem-config)
  1558.         (if (= 1 (exists "s:aemail.cnfg" (noreq)))
  1559.             (if (= 2 @user-level)
  1560.                 ((set aem-changecnfg
  1561.                     (askbool
  1562.                         (prompt "You have an existing 'aemail.cnfg' file in "
  1563.                                 "the s: directory.  Do you want to copy "
  1564.                                 "this file to another location?\n\n"
  1565.                                 "If you copy it to another location, "
  1566.                                 "you can also change it's name.")
  1567.                         (help   "The older versions of AEMail set up "
  1568.                                 "your default configuration for the main "
  1569.                                 "user at 's:aemail.cnfg'.  You no longer "
  1570.                                 "have to use the s: directory or use the "
  1571.                                 "'aemail.cnfg' name for your main user.\n\n"
  1572.                                 "However, if you plan to call AEMail from "
  1573.                                 "the shell you will need a 's:aemail.cnfg' "
  1574.                                 "file")
  1575.                         (choices "Copy" "Don't Copy")))
  1576.                 (if (= 0 aem-changecnfg)
  1577.                     (set aem-config "s:aemail.cnfg")))
  1578.                 (set aem-config "s:aemail.cnfg"))))))
  1579.  
  1580. (debug "aem-config = " aem-config)
  1581.  
  1582. (if (= 1 aem-changecnfg)
  1583.     ((set continue 0)
  1584.      (while (= continue 0) 
  1585.      ((set aem-config
  1586.         (askfile
  1587.             (prompt "Enter the new name and location of your 's:aemail.cnfg' "
  1588.                     "file.")
  1589.             (help   "You indicated you wanted to change the name and/or "
  1590.                     "location of your 's:aemail.cnfg' file.  Enter the "
  1591.                     "new name/location for the configuration file.  It will "
  1592.                     "be copied and re-named and set up as the configuration "
  1593.                     "file for your main user")
  1594.             (default (tackon @default-dest aem-config-dflt))))
  1595.       (if (= "AEMail" (fileonly aem-config))
  1596.           (message "\n\n\"AEMail\" can not be used as a configuration "
  1597.                    "file name!\n\nSelecting 'Proceed' will ask you to "
  1598.                    "re-enter the configuration file name")
  1599.           (set continue 1))))
  1600.     (copyfiles
  1601.         (prompt "copying and renaming 's:aemail.cnfg' file.")
  1602.         (source "s:aemail.cnfg")
  1603.         (dest (pathonly aem-config))
  1604.         (newname (fileonly aem-config)))))
  1605.  
  1606. (set continue 0)
  1607.  
  1608. (if (= "" aem-config)
  1609.     (while (= continue 0) 
  1610.         ((set aem-config
  1611.             (askfile
  1612.                 (prompt "Enter the name of your configuration file for "
  1613.                         "the " aem-iconname " user.")
  1614.                 (help   "You can enter a non-existant file name.  AEMail "
  1615.                         "will create this file when it is first loaded.")
  1616.                 (default (tackon @default-dest aem-config-dflt))))
  1617.         (if (= "AEMail" (fileonly aem-config))
  1618.             (message "\n\n\"AEMail\" can not be used as a configuration "
  1619.                      "file name!\n\nSelecting 'Proceed' will ask you to "
  1620.                      "re-enter the configuration file name")
  1621.             (if (= 0 (exists aem-config))
  1622.                  (set continue 1)
  1623.                  (set continue
  1624.                     (askbool
  1625.                         (prompt "The configuration file you have chosen "
  1626.                                 "("aem-config") "
  1627.                                 "already exists.  Remember, each "
  1628.                                 "configuration file for each user must "
  1629.                                 "be unique\n\n"
  1630.                                 "It is possible that the file you picked "
  1631.                                 "is a legitimate configuration file for "
  1632.                                 "this user.  Select 'Proceed' if you want "
  1633.                                 "to continue with this file or 'Ask "
  1634.                                 "again' if you want to enter another "
  1635.                                 "configuration file name.")
  1636.                         (help   "Each configuration file for each user "
  1637.                                 "must be unique.  You may have chosen a "
  1638.                                 "configuration file that was previously "
  1639.                                 "set up for this user.  If so, you can "
  1640.                                 "ignore this warning and select 'proceed'")
  1641.                         (choices "Proceed" "Ask again"))))))))
  1642.  
  1643. (if (= "" aem-mail_dir)
  1644.     (if (<> "" aem-dft-maildir)
  1645.         ((set continue
  1646.             (askbool
  1647.                 (prompt "You have an assignment of '" aem-dft-maildir
  1648.                            "' as your mail directory (AEMail: assign). "
  1649.                         "Do you want to accept this as your mail "
  1650.                         "directory for this user (\""aem-iconname"\")?\n\n"
  1651.                         "If you reply 'No' you will be asked for the "
  1652.                         "name and path of the mail directory for this "
  1653.                         "user.  The directory will be created if it does "
  1654.                         "not exist.")
  1655.                 (help   "All versions of AEMail prior to 2.00 used the "
  1656.                         "AEMail: assign statement to assign the mail "
  1657.                         "directory to the primary user.  This changed "
  1658.                         "with version 2.00.  The directory is now always "
  1659.                         "identified in the MAIL_DIR= tooltype\n\n"
  1660.                         "You are upgrading from a prior AEMail version "
  1661.                         "and have an AEMail: assign statement.\n\n "
  1662.                         "More than one user can use the same mail "
  1663.                         "directory.")))
  1664.         (if (= 1 continue)
  1665.             (set aem-mail_dir aem-dft-maildir))))
  1666.       ((set aem-yesno
  1667.             (askbool
  1668.                 (prompt "This user (\""aem-iconname "\") has a mail "
  1669.                         "directory called:\n\n"
  1670.                         aem-mail_dir "\n\nDo you want to continue with "
  1671.                         "that directory or change to another?"
  1672.                         "\n\nWARNING: If the directory you change to does "
  1673.                         "not exist, it will be created empty.")
  1674.                 (help   "If you reply 'Change Mail Directory' you will be "
  1675.                         "prompted for the new name.  If the new directory "
  1676.                         "does not already exist, it will be created empty.")
  1677.                 (choices "Keep Mail Directory" "Change Mail Directory")))
  1678.             (if (= 0 aem-yesno)
  1679.                 (set aem-dft-maildir aem-mail_dir
  1680.                      aem-mail_dir ""))))
  1681.  
  1682.  
  1683. (if (= "" aem-mail_dir)
  1684.     ((if (= "" aem-dft-maildir)
  1685.         (set aem-dft-maildir (tackon @default-dest aem-mail-name)))
  1686.     (set aem-mail_dir
  1687.         (askdir
  1688.             (prompt "Enter the name of the mail directory you want to "
  1689.                     "use for this user (\"" aem-iconname "\").  A "
  1690.                     "directory will be created if it does not exist.")
  1691.             (help   "You can select an existing directory or create a new "
  1692.                     "one.  More than one user can use the same mail "
  1693.                     "directory.")
  1694.             (default aem-dft-maildir)
  1695.             (newpath)))
  1696.     (if (<> 2 (exists aem-mail_dir (noreq)))
  1697.         (makedir aem-mail_dir
  1698.             (prompt "making directory for mail")
  1699.             (infos)))))
  1700.  
  1701.  
  1702. (if (= "" aem-passprotect)
  1703.     (set aempassprotect "NO"))
  1704.  
  1705. (if (= "YES" aem-passprotect)
  1706.     (set aem-passprotectmsg "")
  1707.     (set aem-passprotectmsg "NOT "))
  1708.  
  1709. (set aem-yesno
  1710.     (askbool
  1711.         (prompt "The mail file for this user (\""aem-iconname"\") is "
  1712.                 aem-passprotectmsg "currently password protected.\n\n"
  1713.                 "Do you want to password protect the mail file "
  1714.                 "for this user.\n\n"
  1715.                 "The password that is used is the same password "
  1716.                 "that is used to access your pop server")
  1717.         (help    "If you reply 'Yes', that password that you used "
  1718.                 "for the configuration will be required before "
  1719.                 "your mail file can be accessed.  If you do not "
  1720.                 "set this password when you are asked to "
  1721.                 "configure AEMail later, you can set the "
  1722.                 "password when you first load this user's "
  1723.                 "configuration.\n\n"
  1724.                 "You can also remove pass protection by replying 'No'".)))
  1725.  
  1726. (if (= 1 aem-yesno)
  1727.     (set aem-passprotect "YES")
  1728.     (set aem-passprotect "NO"))
  1729.  
  1730.  
  1731. (tooltype
  1732.     (prompt "Setting CONFIG, MAIL_DIR, PASSPROTECT. and INTERLACE tool types")
  1733.     (dest aem-iconpath)
  1734.     (settooltype "MAIL_DIR" aem-mail_dir)
  1735.     (if (<> "" aem-passprotect)
  1736.         (settooltype "PASSPROTECT" aem-passprotect))
  1737.     (settooltype "CONFIG" aem-config))
  1738.             
  1739. (set
  1740.     aem-configure 0
  1741.     aem-needconfig 0
  1742.     aem-options 3
  1743.     aem-need-AREXX 0
  1744.     aem-needstrtarexx 0
  1745.     aem-needstoparexx 0)
  1746.  
  1747.  
  1748. (if (= 1 aem-have-MIAMI)
  1749.     (set
  1750.         aem-need-AREXX 1
  1751.         aem-needstrtarexx 1
  1752.         aem-startnet (tackon aem-default-dest "startnet.miami")
  1753.         aem-needstoparexx 1
  1754.         aem-stopnet  (tackon aem-default-dest "stopnet.miami"))
  1755.     (if (= 1 aem-have-AMITCP)
  1756.         (set
  1757.             aem-need-AREXX 1
  1758.             aem-startnet (tackon aem-default-dest "startnet")
  1759.             aem-stopnet (tackon aem-default-dest "stopnet"))))
  1760.  
  1761. (if (= 1 aem-Termite)
  1762.     ((set
  1763.         aem-from (getenv "ttcp-email-address")
  1764.         aem-tccp-len (strlen aem-from)
  1765.         aem-tccp-cnt 0)
  1766.  
  1767.      (while (<> aem-tccp-cnt aem-tccp-len)
  1768.             (if (= "@" (substr aem-from aem-tccp-cnt 1))
  1769.                 (set
  1770.                     aem-username
  1771.                         (substr aem-from 0 aem-tccp-cnt)
  1772.                     aem-tccp-cnt (+ 1 aem-tccp-cnt)
  1773.                     aem-domain
  1774.                         (substr aem-from aem-tccp-cnt))
  1775.                 (set
  1776.                     aem-tccp-cnt (+ 1 aem-tccp-cnt))))))
  1777.  
  1778. (if (<> 1 (exists aem-config (noreq)))
  1779. (set
  1780.     aem-configure
  1781.         (askbool
  1782.             (prompt "\nYou can configure AEMail now or you can wait until "
  1783.                     "AEMail is first loaded.  Do you want to configure now?\n")
  1784.             (help   "AEMail is configured either by Tool Types in it's icon "
  1785.                     "or by a configuration screen which is automatically "
  1786.                     "called up when you first execute AEMail if the Tool "
  1787.                     "Type parameters were not given.  By replying "
  1788.                     "'Yes, Configure Now' you will be setting the Tool Type "
  1789.                     "parameters\n")
  1790.             (choices "No, Configure Later" "Yes, Configure Now"))
  1791.     )
  1792.  
  1793. (set
  1794.     aem-configure
  1795.         (askbool
  1796.             (prompt "\nYou have an existing configuration file called:\n\n"
  1797.                     aem-config "\n\n"
  1798.                     "Do you want to use it or do you want to re-configure "
  1799.                     "AEMail now?\n")
  1800.             (help   "By replying 'Yes, Re-configure Now' "
  1801.                     "you will be renaming the current configuration file "
  1802.                     "to:\n\n" (cat aem-config ".old") "\n\n"
  1803.                     "and resetting the configuration by tool type "
  1804.                     "parameters\n")
  1805.             (choices "Use existing Config File" "Yes, Re-Configure Now")))
  1806. )
  1807.  
  1808.  
  1809. (if (= 0 aem-configure)
  1810.     ((delete (cat aem-config ".old")
  1811.             (prompt "deleting any previous old configuration file"))
  1812.             
  1813.     (rename aem-config (cat aem-config ".old")
  1814.             (prompt "Renaming old configuration file"))
  1815.  
  1816.     (if (= "" aem-domain)
  1817.         ((set aem-domain (getenv "DOMAIN"))
  1818.         (if (= "" aem-domain)
  1819.             (set aem-domain (getenv "DOMAINNAME")))
  1820.         (if (= "." (substr aem-domain 0 1))
  1821.             (set aem-domain (substr aem-domain 1)))))
  1822.  
  1823.     (if (= "" aem-username)
  1824.         (set aem-username (getenv "USER")))
  1825.  
  1826.     (if (= "" aem-realname)
  1827.         (set aem-realname (getenv "REALNAME")))
  1828.  
  1829.     (Set continue 0)
  1830.  
  1831.     (message "\n\nWe need to know something about your Internet provider and what "
  1832.         "the POP and SMTP Servers on your provider's machine are called.  "
  1833.         "Also, when you signed up for your InterNet service you chose or "
  1834.         "were given a login name and password for your POP server. "
  1835.         "You will be prompted for these names now.  If you have any "
  1836.         "questions as to what parameters to use, select 'help' "
  1837.         "or consult information provided by your Internet provider.")
  1838.  
  1839.     (while
  1840.         (= continue 0)
  1841.  
  1842.         (set
  1843.  
  1844.         aem-domain
  1845.             (askstring
  1846.                 (prompt "\nFor user \""aem-iconname"\":\n" 
  1847.                         "\nEnter the domain name for your InterNet Provider " 
  1848.                         "required for getting mail\n\n")
  1849.                 (help   "The domain name is usually the part of your e-mail address "
  1850.                         "that follows the '@' sign.  If something else is required "
  1851.                         "by your Internet Provider, provide it here.\n\n"
  1852.                         "As an example, my email "
  1853.                         "address is\n\njzachar@calweb.com\n\nThe domain name "
  1854.                         "for my Internet provider is therefor 'calweb.com'.")
  1855.                 (default aem-domain))
  1856.  
  1857.         aem-popserver
  1858.             (if (= "" aem-domain)
  1859.                 ("")
  1860.                 (if (= "" aem-popserver)
  1861.                     (cat "pop." aem-domain)
  1862.                     (aem-popserver)))
  1863.  
  1864.         aem-smtpserver
  1865.             (if (= "" aem-domain)
  1866.                 ("")
  1867.                 (if (= "" aem-smtpserver)
  1868.                     (cat "smtp." aem-domain)
  1869.                     (aem-smtpserver)))
  1870.  
  1871.         aem-popserver
  1872.             (askstring
  1873.                 (prompt "\nFor user \""aem-iconname"\":\n"
  1874.                         "\nEnter the name of your POP Server\n\n")
  1875.                 (help   "POP stands for 'Post Office Protocol' and your "
  1876.                         "POP Server is the name assigned to the host "
  1877.                         "computer that holds your Internet mail.  Normally "
  1878.                         "this would be 'pop.' or 'mail.'  prepended to your "
  1879.                         "Domain name.\n\n"
  1880.                         "Consult your Internet provider if the POP Server "
  1881.                         "is called something other than '"aem-popserver
  1882.                         "' enter that name in this string requester ")
  1883.                 (default aem-popserver))
  1884.  
  1885.         aem-smtpserver
  1886.             (askstring
  1887.                 (prompt "\nFor user \""aem-iconname"\":\n"
  1888.                         "\nEnter the name of your SMTP Server\n")
  1889.                 (help   "SMTP stands for 'Simple Mail Transfer Protocol' and "
  1890.                         "your SMTP server is the name assigned to the host "
  1891.                         "computer that sends your Internet mail.  Normally "
  1892.                         "this would be 'smtp.' or 'mail.' prepended to your " 
  1893.                         "Domain name.\n\n"
  1894.                         "Consult your Internet provider if the SMTP Server "
  1895.                         "is called something other than '"aem-smtpserver
  1896.                         "' enter that name in this string requester ")
  1897.                 (default aem-smtpserver))
  1898.  
  1899.         aem-username
  1900.             (askstring
  1901.                 (prompt "\nFor user \""aem-iconname"\":\n"
  1902.                         "\nEnter the login name you have been assigned by your "
  1903.                 "InterNet Provider for logging into your POP Server\n\n"
  1904.                 "NOTE: Your provider may have allowed you to chose this login "
  1905.                 "name.\n")
  1906.                 (help "You must give your login name.  The login name consists "
  1907.                 "of lowercase letters a-z and numbers.  Its recommended maximum "
  1908.                 "length is 8 characters.\n\n"
  1909.                 "Examples of acceptable login names are 'jzachar' and "
  1910.                 "'an345'.")
  1911.                 (default aem-username))
  1912.  
  1913.         aem-password
  1914.             (askstring
  1915.                 (prompt "\nFor user \""aem-iconname"\":\n"
  1916.                         "\nEnter the password you need to log into your "
  1917.                 "POP Server.\n\n"
  1918.                 "NOTE: Your provider may have assigned you your password"
  1919.                 " or you were allowed to chose your own.\n")
  1920.                 (help   "This may be the same password that you use to log "
  1921.                         "into your Internet Provider.  Consult your Internet "
  1922.                         "Provider (ISP) if it is different.")
  1923.                 (default aem-password))
  1924.  
  1925.  
  1926.         continue
  1927.             (askbool
  1928.                 (prompt "Is the following information correct for user "
  1929.                     aem-iconname "?\n\n"
  1930.                     "SMTP Domain name: " aem-domain "\n"
  1931.                     "POP Server Name: " aem-popserver "\n"
  1932.                     "SMTP Server Name: " aem-smtpserver "\n"
  1933.                     "Login name: " aem-username "\n"
  1934.                     "Password: " aem-password "\n\n")
  1935.                 (help "If you have made a mistake on any of the entries you "
  1936.                 "can select \"No, Enter Again\" or, if eveything is all right, "
  1937.                 "select \"Yes, Continue\"\n")
  1938.                 (choices "Yes, Continue" "No, Enter Again"))
  1939.         )
  1940.     )
  1941.  
  1942.     (Set continue 0)
  1943.  
  1944.     (set
  1945.         aem-from 
  1946.             ("%s@%s" aem-username aem-domain))
  1947.  
  1948.     (message "\n\nWhen you signed up for your InterNet service you were "
  1949.          "also assigned an email address to receive mail with.  You will "
  1950.          "be prompted for this now.")
  1951.  
  1952.  
  1953.     (while
  1954.         (= continue 0)
  1955.  
  1956.         (set
  1957.  
  1958.         aem-from
  1959.             (askstring
  1960.                 (prompt "\nFor user \""aem-iconname"\":\n"
  1961.                         "\nEnter your full email address (user@domain):\n")
  1962.                 (help "You must give your email address.  The email address "
  1963.                     "is what you are known by on the Internet and consists of " 
  1964.                     "a username and domain name separated by an '@' sign.\n\n"
  1965.                     "NOTE: The username and domain name could be the same "
  1966.                     "as the POP login name and SMTP Domain Name you were "
  1967.                     "prompted for before, or they MAY NOT be - consult your "
  1968.                     "ISP.")
  1969.                 (default aem-from))
  1970.  
  1971.         continue
  1972.             (askbool
  1973.                 (prompt "\n\nIs the following information correct?\n\n"
  1974.                     "Email Address: " aem-from "\n\n")
  1975.                 (help "If you have made a mistake with this entry you "
  1976.                 "can select \"No, Enter Again\" or, if eveything is all right, "
  1977.                 "select \"Yes, Continue\"\n")
  1978.                 (choices "Yes, Continue" "No, Enter Again"))
  1979.         )
  1980.     )
  1981.  
  1982.     (Set continue 0)
  1983.  
  1984.     (message "\n\nThere is certain identity information that you "
  1985.          "may give to further identify you on the Internet.  These include "
  1986.          "your real name, a possible reply address, and the organization "
  1987.          "that you belong to.  You will be prompted for these now. These are "
  1988.          "all optional parameters and you can leave them blank if you wish.")
  1989.  
  1990.     (set aem-replyto aem-from)
  1991.  
  1992.     (while
  1993.         (= continue 0)
  1994.  
  1995.         (set
  1996.  
  1997.         aem-realname
  1998.             (askstring
  1999.                 (prompt "\nFor user \""aem-iconname"\":"
  2000.                         "\n\nEnter the real name for "aem-from ":\n")
  2001.                 (help "The real name can contain any characters except "
  2002.                     "comma (','), colon (':') or bar ('|').")
  2003.                 (default aem-realname))
  2004.  
  2005.         aem-replyto
  2006.             (askstring
  2007.                 (prompt "\nFor user \""aem-iconname"\":"
  2008.                         "\n\nEnter the email address you want replies "
  2009.                         "sent to\n\n")
  2010.                 (help   "This may be the same as your regular email address. "
  2011.                         "This address is optional and can be left blank.")
  2012.                 (default aem-replyto))
  2013.  
  2014.         aem-organization
  2015.             (askstring
  2016.                 (prompt "\nFor user \""aem-iconname"\":\n"
  2017.                         "\nEnter the organization you belong to (optional):\n")
  2018.                 (help "The organization is optional and can be left blank.")
  2019.                 (default aem-organization))
  2020.  
  2021.         continue
  2022.             (askbool
  2023.                 (prompt "\n\nIs the following information correct?\n\n"
  2024.                     "Real name: " aem-realname "\n"
  2025.                     "Reply To Address: " aem-replyto "\n"
  2026.                     "Organization: " aem-organization "\n\n")
  2027.                 (help "If you have made a mistake on any of the entries you "
  2028.                 "can select \"No, Enter Again\" or, if eveything is all right, "
  2029.                 "select \"Yes, Continue\"\n")
  2030.                 (choices "Yes, Continue" "No, Enter Again"))
  2031.         )
  2032.     )
  2033.  
  2034.     (message "\n\nAEMail requires an editor to prepare messages to send.  "
  2035.         "You can use the standard AmigaDOS editor, ed, or any "
  2036.         "editor of your choice.")
  2037.  
  2038.     (set aem-edonwb-msg ""
  2039.          aem-default-ed aem-default-editor
  2040.          continue 0)
  2041.  
  2042.     (if (<> "" aem-default-editor)
  2043.         (if (= "WB;" (substr aem-default-editor 0 3))
  2044.             (set aem-edonwb-msg "Opening on the Workbench"
  2045.                  aem-default-ed (substr aem-default-editor 3))))
  2046.  
  2047.     (if (<> "" aem-default-ed)
  2048.         (set continue
  2049.             (askbool
  2050.                 (prompt "You previously specified " aem-default-ed
  2051.                         aem-edonwb-msg " as your editor.  Do you want "
  2052.                         "to use this editor for user \"" aem-iconname "\"?"))))
  2053.  
  2054.     (if (= 1 continue)
  2055.         (set aem-editor aem-default-editor)
  2056.         ((set
  2057.         aem-editor
  2058.             (askfile
  2059.                 (prompt "For user \""aem-iconname"\":\n"
  2060.                         "Enter the Editor you want to use with AEMail.")
  2061.                 (help   "AEMail requires an editor to prepare messages to "
  2062.                         "send.  After your select the editor from the file "
  2063.                         "requester you will be asked to enter parameter "
  2064.                         "information required by your editor.\n")
  2065.                 (default "SYS:c/ed"))
  2066.  
  2067.         aem-editor
  2068.             (askstring
  2069.                 (prompt "\nFor user \""aem-iconname"\":\n\n"
  2070.                         "Add the parameters required for your editor.\n\n"
  2071.                         "You must always add '%s' to specify where your "
  2072.                         "mail file name goes.\n")
  2073.                 (help   "You will need to add parmeters that may be "
  2074.                         "required by your editor.  One required parameter "
  2075.                         "required by ALL editors is '%s' to specify where "
  2076.                         "the mail file name goes.\n")
  2077.                 (default (cat aem-editor " %s")))
  2078.  
  2079.         aem-edonwb
  2080.             (askbool
  2081.                 (prompt "\nFor user \""aem-iconname"\":\n\n"
  2082.                         "Does your editor have to open on the Workbench?"
  2083.                 (help   "Some editors, like Commodore's ED will always open "
  2084.                         "on the Workbench.  Others will open on their own "
  2085.                         "screen.  If your editor opens on the Workbench, "
  2086.                         "you must reply 'YES' to this request.\n")))
  2087.  
  2088.         aem-editor
  2089.             (if (= 1 aem-edonwb)
  2090.                 (cat "WB;" aem-editor)
  2091.                 ("%s" aem-editor))
  2092.     )))
  2093.  
  2094.     (set 
  2095.         aem-neednetscrpts
  2096.             (askbool
  2097.                 (prompt "\nFor user \""aem-iconname"\":\n\n"
  2098.                         "Do you want Start Net and/or Stop Net scripts?\n")
  2099.                 (help   "If you reply 'Yes', you will be prompted for your "
  2100.                         "Start Net and Stop Net scripts.\n"
  2101.                         "If you reply 'No', AEMail will run without any "
  2102.                         "Start Net or Stop Net scripts.\n")))
  2103.  
  2104.     (if (= 1 aem-neednetscrpts)
  2105.         (if (<> "" aem-startnet)
  2106.           (set aem-neednetscrpts
  2107.             (askbool
  2108.                 (prompt "Are the StartNet and/or StopNet scripts you want to "
  2109.                         "use for this user (\""aem-iconname"\") the following:\n\n"
  2110.                         "Start Net: " aem-startnet "\n"
  2111.                         "Stop Net:  " aem-stopnet  "\n")
  2112.                 (help   "Only reply 'NO' if your Start Net and Stop Net scripts "
  2113.                         "are not the scripts listed listed below:\n\n"
  2114.                          aem-startnet "\n"
  2115.                          aem-stopnet "\n"))))
  2116.         (set
  2117.             aem-needstrtarexx 0
  2118.             aem-startnet ""
  2119.             aem-needstoparexx 0
  2120.             aem-stopnet ""))
  2121.  
  2122.  
  2123.     (if (= 0 aem-neednetscrpts)
  2124.         ((set
  2125.           need-startnet
  2126.             (askbool
  2127.                 (prompt "\nFor user \""aem-iconname"\":\n\n"
  2128.                         "Do you need a Start Net script?")
  2129.                 (help   "If you reply 'No' AEMail will run without a Start Net "
  2130.                         "script\n\nIf you reply 'YES' you will be prompted "
  2131.                         "for the location of your Start Net script")))
  2132.         (if (= 1 need-startnet)
  2133.              (set
  2134.                aem-startnet
  2135.                 (askfile
  2136.                   (prompt "Enter the Start Net script you want to use "
  2137.                           "with AEMail.")
  2138.                   (help   "If you are NOT using the standard AmiTCP startnet "
  2139.                           "script in AmiTCP:bin or the standard Miami script "
  2140.                           "you will have to provide the "
  2141.                           "script you are using.\n")
  2142.                   (default (tackon aem-default-dest "startnet")))
  2143.                aem-needstrtarexx
  2144.                 (askbool
  2145.                     (prompt "Is this an AmigaDOS script or an AREXX script?")
  2146.                     (help   "The standard AmiTCP Start Net script is an AmigaDos "
  2147.                             "script that calls AREXX\n\n "
  2148.                             "The standard Miami script is an AREXX script "
  2149.                             "AND must be called from AREXX\n")
  2150.                     (choices "AREXX script" "AmigaDOS script")))
  2151.              (set aem-startnet ""
  2152.                   aem-needstrtarexx 0))
  2153.  
  2154.         (set
  2155.           need-stopnet
  2156.             (askbool
  2157.                 (prompt "\nFor user \""aem-iconname"\":\n\n"
  2158.                         "Do you need a Stop Net script?")
  2159.                 (help   "If you reply 'No' AEMail will run without a Stop Net "
  2160.                         "script\n\nIf you reply 'YES' you will be prompted "
  2161.                         "for the location of your Stop Net script")))
  2162.         (if (= 1 need-stopnet)
  2163.             (set
  2164.                aem-stopnet
  2165.                 (askfile
  2166.                   (prompt "Enter the Stop Net script you want to use with AEMail.")
  2167.                   (help   "If you are NOT using the standard AmiTCP stopnet "
  2168.                           "script in AmiTCP:bin or the standard Miami script "
  2169.                           "you will have to provide the "
  2170.                           "script you are using.\n")
  2171.                   (default (tackon aem-default-dest "stopnet")))
  2172.                aem-needstoparexx
  2173.                 (askbool
  2174.                     (prompt "Is this an AmigaDOS script or an AREXX script?")
  2175.                     (help   "The standard AmiTCP Stop Net script is an AmigaDos "
  2176.                             "script that calls AREXX\n\n "
  2177.                             "The standard Miami script is an AREXX script "
  2178.                             "AND must be called from AREXX\n")
  2179.                     (choices "AREXX script" "AmigaDOS script")))
  2180.              (set aem-stopnet ""
  2181.                   aem-needstoparexx 0))))
  2182.  
  2183.     (set aem-options
  2184.         (askoptions
  2185.             (prompt "Select those AEMail options you want AEMail to open with\n\n")
  2186.             (help @askoptions-help)
  2187.             (choices "Delete Mail from Server"
  2188.                  "Strip Duplicate Messages"
  2189.                  "Display Full Header"
  2190.                  "Include Header in Reply"
  2191.                  "Automatic Connection at Startup"
  2192.                  )
  2193.             (default 3))
  2194.     )))
  2195.  
  2196.  
  2197. (if (= 1 aem-needstrtarexx)
  2198.     (set
  2199.         aem-startnet
  2200.             (cat "rx " aem-startnet)))
  2201.  
  2202. (if (= 1 aem-needstoparexx)
  2203.     (set
  2204.         aem-stopnet
  2205.             (cat "rx " aem-stopnet)))
  2206.     (debug "'aem-username' is " aem-username)
  2207.     (debug "'aem-realname' is " aem-realname)
  2208.     (debug "'aem-replyto' is " aem-replyto)
  2209.  
  2210. (tooltype
  2211.     (prompt "Setting AEMail Tool Types")
  2212.     (dest aem-iconpath)
  2213.     (if (<> "" aem-username)
  2214.         (settooltype "USERID" aem-username))
  2215.     (if (<> "" aem-password)
  2216.         (settooltype "PASSWRD" aem-password))
  2217.     (if (<> "" aem-realname)
  2218.         (settooltype "REALNAME" aem-realname))
  2219.     (if (<> "" aem-from)
  2220.         (settooltype "FROM" aem-from))
  2221.     (if (<> "" aem-replyto)
  2222.         (settooltype "REPLYTO" aem-replyto))
  2223.     (if (<> "" aem-organization)
  2224.         (settooltype "ORGANIZATION" aem-organization))
  2225.     (if (<> "" aem-domain)
  2226.         (settooltype "DOMAIN" aem-domain))
  2227.     (if (<> "" aem-popserver)
  2228.         (settooltype "POP_SERVER" aem-popserver))
  2229.     (if (<> "" aem-smtpserver)
  2230.         (settooltype "SMTP_SERVER" aem-smtpserver))
  2231.     (if (<> "" aem-editor)
  2232.         (settooltype "EDITOR" aem-editor))
  2233.     (if (<> "" aem-startnet)
  2234.         (settooltype "STARTNET" aem-startnet))
  2235.     (if (<> "" aem-stopnet)
  2236.         (settooltype "STOPNET" aem-stopnet))
  2237.     (if (BITAND aem-options 1)
  2238.         (settooltype "DELETEMAIL" "YES"))
  2239.     (if (BITAND aem-options 2)
  2240.         (settooltype "STRIPDUPS" "YES"))
  2241.     (if (BITAND aem-options 4)
  2242.         (settooltype "FULLHEADER" "YES"))
  2243.     (if (BITAND aem-options 8)
  2244.         (settooltype "HDRINREPLY" "YES"))
  2245.     (if (BITAND aem-options 16)
  2246.         (settooltype "AUTOCONNECT" "YES"))
  2247. )
  2248.  
  2249. (set aem-mailcapdir "T:AEMfiles"
  2250.      aem-existmailcap 0
  2251.      aem-keepmailcap 0)
  2252.  
  2253. (if (= "" aem-rexx-dir)
  2254.     (set aem-rexx-dir
  2255.         (if (= 2 (exists (tackon @default-dest "ARexx")))
  2256.             (tackon @default-dest "ARexx")
  2257.             (@default-dest))))
  2258.  
  2259. (if (= 1 (exists (tackon aem-mail_dir "mailcap")))
  2260.     ((set aem-keepmailcap 1)
  2261.     (if (= 2 @user-level)
  2262.         (set aem-keepmailcap
  2263.             (askbool
  2264.                 (prompt "There is an existing mailcap file in the '"
  2265.                         aem-mail_dir "' used by this user (\""aem-iconname
  2266.                         "\").\n\n"
  2267.                         "Do you wish to keep this mailcap or substitute "
  2268.                         "another?")
  2269.                 (help   "If you select 'Keep Existing', the installation "
  2270.                         "script will not write over your existing mailcap "
  2271.                         "file.\n\n"
  2272.                         "Select 'Substitute Another' if you want to select "
  2273.                         "another mailcap including the special mailcap for "
  2274.                         "displaying HTML in your ARexx Drawer, or if you "
  2275.                         "want to use the default mailcap that comes with "
  2276.                         "the installation.")
  2277.                 (choices "Keep Existing" "Substitute Another"))))))
  2278.  
  2279. (if (= 0 aem-keepmailcap)  
  2280. (if (= 2 @user-level)
  2281.     (set aem-existmailcap
  2282.         (askbool
  2283.             (prompt "For user \""aem-iconname"\":\n"
  2284.                     "\nDo you want to use an existing mailcap file used by "
  2285.                     "ANOTHER program or the special mailcap file for display "
  2286.                     "HTML documents in the ARexx directory?\n\nIf you want to "
  2287.                     "use the default mailcap file without the HTML display "
  2288.                     "that comes with AEMail, reply 'NO' to this message.")
  2289.             (help   "AEMail can run with a mailcap file created for another "
  2290.                     "program.  If you reply 'YES' to this message you will "
  2291.                     "be prompted for the directory containing your mailcap "
  2292.                     "file.  That also applies to the special mailcap file "
  2293.                     "in the ARexx drawer.  The mailcap file you pick will "
  2294.                     "be copied to your mail drawer for this user.")))))
  2295.  
  2296. (set continue 0)
  2297.  
  2298. (if (= 1 aem-existmailcap)
  2299. (while (= 0 continue)
  2300.     ((set continue 1)
  2301.      (set aem-mailcapdir
  2302.         (askdir
  2303.             (prompt "Enter the drawer that contains your mailcap file\n\n"
  2304.                     "If you use the special mailcap file for HTML display "
  2305.                     "it must be in the ARexx directory in " @default-dest 
  2306.                     " along with the 'html.aem' ARexx script for it to "
  2307.                     "properly work.")
  2308.             (help   "AEMail can run with a mailcap file created for another "
  2309.                     "program or the special mailcap in you ARexx directory. "
  2310.                     "Enter the directory that contains the mailcap "
  2311.                     "file that you want and it will be copied to your mail "
  2312.                     "directory.")
  2313.             (default aem-rexx-dir)
  2314.             (newpath)))
  2315.     (if (<> 1 (exists (tackon aem-mailcapdir "mailcap")(noreq)))
  2316.         ((set continue
  2317.             (askbool
  2318.                 (Prompt "A mailcap file does not exist in the directory you "
  2319.                         "have specified. Continuing will result in no mailcap "
  2320.                         "file being copied to your mail directory.")
  2321.                 (Help   "If you reply 'Try Again' you will be asked for "
  2322.                         "the mailcap drawer again.  Selecting 'Continue' will "
  2323.                         "mean that no mailcap file will be copied to your "
  2324.                         "mail directory.  If an existing mailcap file was in "
  2325.                         "your mail directory, it will remain.  If not, you "
  2326.                         "have to create the mailcap file with the AEMail "
  2327.                         "'Viewer' page of the 'Configuration' screen or "
  2328.                         "run the installation script again to update this "
  2329.                         "user.")
  2330.                 (choices "Continue" "Try Again")))
  2331.         (if (= 1 continue)
  2332.             (set aem-keepmailcap 1)))))))
  2333.  
  2334.  
  2335. (if (= 0 aem-keepmailcap)
  2336.     (if (= 0 aem-existmailcap)
  2337.         (if (< exec-version version_3_0)
  2338.             ((message "You are running under AmigaDos 2.1 and have not "
  2339.                       "specified an existing mailcap file.  You will "
  2340.                       "have to build your mailcap file with the 'Viewer' "
  2341.                       "page of AEMail's 'Configuration' screen which can be "
  2342.                       "reached by selecting the 'Configuration/Edit' menu "
  2343.                       "item under the 'Project' menu in AEMail.\n\n"
  2344.                       "You can not use the default mailcap that comes with "
  2345.                       "AEMail.")
  2346.             (set aem-keepmailcap 1)))))
  2347.  
  2348. (if (= 0 aem-keepmailcap)
  2349.     (copyfiles
  2350.         (prompt "Copying mailcap to " aem-mail_dir)
  2351.         (source (tackon aem-mailcapdir "mailcap"))
  2352.         (dest   aem-mail_dir)))
  2353.  
  2354. (set aem-curuser (+ 1 aem-curuser))
  2355.  
  2356. (debug "aem-curuser is " aem-curuser)
  2357.  
  2358. ))
  2359.              
  2360. ; (exit)
  2361.  
  2362. (textfile
  2363.     (prompt "Creating ENV:AEMail_Dir")
  2364.     (help "Creating ENV:AEMail_Dir")
  2365.     (dest "ENV:AEMail_Dir")
  2366.     (append @default-dest))
  2367.  
  2368. (textfile
  2369.     (prompt "Creating ENVARC:AEMail_Dir")
  2370.     (help "Creating ENVARC:AEMail_Dir")
  2371.     (dest "ENVARC:AEMail_Dir")
  2372.     (append @default-dest))
  2373.  
  2374. (textfile
  2375.     (prompt "Creating ENV:AEMail_Ver")
  2376.     (help "Creating ENV:AEMail_Ver")
  2377.     (dest "ENV:AEMail_Ver")
  2378.     (append aem-verstr))
  2379.  
  2380. (textfile
  2381.     (prompt "Creating ENVARC:AEMail_Ver")
  2382.     (help "Creating ENVARC:AEMail_Ver")
  2383.     (dest "ENVARC:AEMail_Ver")
  2384.     (append aem-verstr))
  2385.  
  2386.  
  2387. (startup
  2388.     aem-name
  2389.         (prompt "Adding AEMAIL2 assign to S:User-Startup")
  2390.         (help   "An ASSIGN statement for AEMAIL2 will now be added to the S:User-Startup")
  2391. ;       (command ("ASSIGN %s \"%s\"\n" aem-assign aem-mail_dir))
  2392.         (command ("ASSIGN AEMAIL2: \"%s\"\n" aem-default-dest))
  2393.         (command ("ASSIGN C: sys:REXXC ADD")))
  2394.  
  2395. ; (makeassign aem-name aem-mail_dir)
  2396.  
  2397. (makeassign "AEMAIL2" @default-dest)
  2398. (makeassign aem-dsk1)
  2399. (makeassign aem-dsk2)
  2400.  
  2401.  
  2402. (message
  2403.     "\n\nThe installation of AEMail is now complete.  You can execute AEMail "
  2404.     "now by double clicking on one of the project icons without rebooting your "
  2405.     "system.  Please read the AEMail.Readme file before executing AEMail.")
  2406.  
  2407. (if (= 0 aem-updateonly)
  2408.     (set AEM-End
  2409.         (run pager-cmd " T:AEMfiles/AEMail.readme" (safe))))
  2410.  
  2411. (delete
  2412.     "T:AEMfiles"
  2413.     (prompt "Deleting T: AEMail files")
  2414.     (optional "force")
  2415.     (safe)
  2416.     (infos)
  2417.     (all))
  2418.  
  2419. (exit)
  2420.